Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactoring Matroid ext lemmas #19664

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

refactoring Matroid ext lemmas #19664

wants to merge 2 commits into from

Conversation

madvorak
Copy link
Collaborator

@madvorak madvorak commented Dec 1, 2024


Please doublecheck whether I used @[ext] correctly.

@madvorak madvorak added the t-combinatorics Combinatorics label Dec 1, 2024
Copy link

github-actions bot commented Dec 1, 2024

PR summary d58d4a9eea

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ ext_base
+ ext_iff_base
+ ext_iff_indep
+ ext_indep
- eq_iff_indep_iff_indep_forall
- eq_of_base_iff_base_forall
- eq_of_indep_iff_indep_forall

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@apnelson1 apnelson1 assigned apnelson1 and unassigned apnelson1 Dec 1, 2024
@apnelson1 apnelson1 self-requested a review December 1, 2024 17:25
@apnelson1
Copy link
Collaborator

LGTM

@@ -665,19 +667,19 @@ theorem Base.exists_insert_of_ssubset (hB : M.Base B) (hIB : I ⊂ B) (hB' : M.B
(hB.indep.subset hIB.subset).exists_insert_of_not_base
(fun hI ↦ hIB.ne (hI.eq_of_subset_base hB hIB.subset)) hB'

theorem eq_of_indep_iff_indep_forall {M₁ M₂ : Matroid α} (hE : M₁.E = M₂.E)
@[ext] theorem ext_indep {M₁ M₂ : Matroid α} (hE : M₁.E = M₂.E)
(h : ∀ I, I ⊆ M₁.E → (M₁.Indep I ↔ M₂.Indep I)) : M₁ = M₂ :=
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps ∀ ⦃I⦄, I ⊆ M.E → _ instead (and also in the iff version)? To match with ext_base.

@@ -459,7 +461,7 @@ theorem Base.diff_infinite_comm (hB₁ : M.Base B₁) (hB₂ : M.Base B₂) :
(B₁ \ B₂).Infinite ↔ (B₂ \ B₁).Infinite :=
infinite_iff_infinite_of_encard_eq_encard (hB₁.encard_diff_comm hB₂)

theorem eq_of_base_iff_base_forall {M₁ M₂ : Matroid α} (hE : M₁.E = M₂.E)
theorem ext_base {M₁ M₂ : Matroid α} (hE : M₁.E = M₂.E)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add an iff version too:

theorem ext_iff_base {M₁ M₂ : Matroid α} :
    M₁ = M₂ ↔ M₁.E = M₂.E ∧ ∀ ⦃B⦄, B ⊆ M₁.E → (M₁.Base B ↔ M₂.Base B) :=
  ⟨fun h ↦ by simp [h], fun ⟨hE, h⟩ ↦ ext_base hE h⟩ 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-combinatorics Combinatorics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants