Compfiles/Usa2015P3.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.
Project sources: Pinned compfiles documentation, Pinned compfiles corpus index
40 declarations, 0 contain sorry, 0 declared as axioms
USA Mathematical Olympiad 2015, Problem 3
Let S = {1, 2, ..., n}, where n ≥ 1. Each of the 2ⁿ subsets of S is to be colored red or blue. (The subset itself is assigned a color and not its individual elements.) For any set T ⊆ S, we then write f(T) for the number of subsets of T that are blue. Determine the number of colorings that satisfy the following condition: for any subsets T₁ and T₂ of S,
f(T₁) f(T₂) = f(T₁ ∪ T₂) f(T₁ ∩ T₂).
Imports (5)
Imported by 1 file
- abbrev
Usa2015P3.ColoringA coloring of the subsets ofFin n;truemeans blue,falsemeans red line 33 sourceSource documentation
A coloring of the subsets of
Fin n;truemeans blue,falsemeans red.standard axioms: Quot.sound, propext what this means
Statement uses:
NatProof uses:
Finset,Fin,Boolabbrev Coloring (n : ℕ) : Type := Finset (Fin n) → Bool
- def
Usa2015P3.blueCardblueCard c Tis the number of subsets ofTthat are colored blue byc; this is the functionfof the problem statement line 37 sourceSource documentation
blueCard c Tis the number of subsets ofTthat are colored blue byc; this is the functionfof the problem statement.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2015P3.Coloring,Finset,FinProof uses:
Finset.card,Finset.filter,Eq,Bool,Bool.true,Finset.powerset1 instances, coercions and auxiliary constants left out.
def blueCard {n : ℕ} (c : Coloring n) (T : Finset (Fin n)) : ℕ := …Mentions: Usa2015P3.Coloring
- def
Usa2015P3.IsValidA coloring is valid if it satisfies the multiplicative condition of the problem line 41 sourceSource documentation
A coloring is valid if it satisfies the multiplicative condition of the problem.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2015P3.ColoringProof uses:
Finset,Fin,Eq,HMul.hMul, Usa2015P3.blueCard,Union.union,Inter.inter5 instances, coercions and auxiliary constants left out.
def IsValid {n : ℕ} (c : Coloring n) : Prop := …Mentions: Usa2015P3.Coloring
- def
Usa2015P3.ValidColoringsThe colorings that the problem asks to count line 46 sourceSource documentation
The colorings that the problem asks to count.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
Subtype, Usa2015P3.Coloring, Usa2015P3.IsValiddef ValidColorings (n : ℕ) : Type := {c : Coloring n // IsValid c}Mentions: Usa2015P3.Coloring, Usa2015P3.IsValid
- instance
Usa2015P3.(instance at line 48)line 48 source - instance
Usa2015P3.(instance at line 50)line 50 source - def
Usa2015P3.XThe intersection of all blue sets of a coloring line 56 sourceSource documentation
The intersection of all blue sets of a coloring. We show that for a nontrivial valid coloring the blue sets are exactly the sets
TwithX c ⊆ T ⊆ X c ∪ B c.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2015P3.Coloring,Finset,FinProof uses:
Finset.filter,Eq,Bool,Bool.true,Membership.mem,Finset.univ9 instances, coercions and auxiliary constants left out.
def X {n : ℕ} (c : Coloring n) : Finset (Fin n) := …Mentions: Usa2015P3.Coloring
- def
Usa2015P3.BThe elementsioutsideX csuch thatX c ∪ {i}is blue line 60 sourceSource documentation
The elements
ioutsideX csuch thatX c ∪ {i}is blue.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2015P3.Coloring,Finset,FinProof uses:
Finset.filter,And,Not,Membership.mem, Usa2015P3.X,Eq,Bool,Union.union,Singleton.singleton,Bool.true,Finset.univ10 instances, coercions and auxiliary constants left out.
def B {n : ℕ} (c : Coloring n) : Finset (Fin n) := …Mentions: Usa2015P3.Coloring
- lemma
Usa2015P3.mem_Xline 63 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2015P3.Coloring,Fin,Iff,Membership.mem,Finset, Usa2015P3.X,Eq,Bool,Bool.trueProof uses:
of_eq_true,Eq.trans,True,congrFun',congrArg,Finset.filter,Finset.univ,And,true_and,iff_self13 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2015P3.mem_Bline 67 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2015P3.Coloring,Fin,Iff,Membership.mem,Finset, Usa2015P3.B,And,Not, Usa2015P3.X,Eq,Bool,Union.union,Singleton.singleton,Bool.trueProof uses:
of_eq_true,Eq.trans,Insert.insert,True,congr,congrArg,Finset.univ,Finset.filter,congrFun',Finset.filter_congr,Iff.of_eq,Finset.union_singleton,true_and,iff_self18 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2015P3.blueCard_ne_zero_iffline 71 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2015P3.Coloring,Finset,Fin,Iff,Ne, Usa2015P3.blueCard,OfNat.ofNat,Exists,And,LE.le,Eq,Bool,Bool.trueProof uses:
Eq.mpr,Finset.card,Finset.filter,Finset.powerset,id,congrArg,Usa2015P3.blueCard.eq_1,LT.lt,Eq.symm,propext,pos_iff_ne_zero,Finset.Nonempty,Finset.card_pos,Membership.mem,Finset.filter_nonempty_iff,of_eq_true,Eq.trans,True,congrFun',funextand 1 more20 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2015P3.blueCard_ne_zero_of_memline 76 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2015P3.Coloring,Finset,Fin,Eq,Bool,Bool.true,Ne, Usa2015P3.blueCard,OfNat.ofNatProof uses:
Iff.mpr,Exists,And,LE.le, Usa2015P3.blueCard_ne_zero_iff,Exists.intro,And.intro,Finset.Subset.refl5 instances, coercions and auxiliary constants left out.
- lemma
Usa2015P3.blueCard_ne_zero_interIf two sets contain a blue subset each, so does their intersection line 87 sourceSource documentation
If two sets contain a blue subset each, so does their intersection.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2015P3.Coloring, Usa2015P3.IsValid,Finset,Fin,Ne, Usa2015P3.blueCard,OfNat.ofNat,Inter.interProof uses:
Eq,HMul.hMul,Union.union,mul_ne_zero,Eq.mp,congrArg,MulZeroClass.mul_zero22 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
lemma blueCard_ne_zero_inter {T₁ T₂ : Finset (Fin n)} (h₁ : blueCard c T₁ ≠ 0) (h₂ : blueCard c T₂ ≠ 0) : blueCard c (T₁ ∩ T₂) ≠ 0 := by …Mentions: Usa2015P3.blueCard
- lemma
Usa2015P3.blueCard_ne_zero_inter_allThe intersection of a nonempty family of sets each containing a blue subset itself contains a blue subset line 96 sourceSource documentation
The intersection of a nonempty family of sets each containing a blue subset itself contains a blue subset.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2015P3.Coloring, Usa2015P3.IsValid,Finset,Fin,Finset.Nonempty,Membership.mem,Ne, Usa2015P3.blueCard,OfNat.ofNat,Finset.filter,Finset.univProof uses:
Finset.Nonempty.cons_induction,Singleton.singleton,Eq,Finset.ext,of_eq_true,Iff,Eq.trans,True,congrFun',congrArg,Finset.filter_congr,Iff.of_eq,forall_congr,implies_congr,Eq.refl,Finset.filter_mem_eq_of_subset,LE.le,iff_self,Eq.mpr,idand 15 more33 instances, coercions and auxiliary constants left out.
Tactic trace: 17 steps
Open to load the checked before-and-after goal states.
lemma blueCard_ne_zero_inter_all (F : Finset (Finset (Fin n))) : F.Nonempty → (∀ T ∈ F, blueCard c T ≠ 0) → blueCard c (Finset.univ.filter fun i => ∀ T ∈ F, i ∈ T) ≠ 0 := by …Mentions: Usa2015P3.blueCard
- lemma
Usa2015P3.blueCard_ne_zero_XThe intersectionX cof all blue sets contains a blue subset line 123 sourceSource documentation
The intersection
X cof all blue sets contains a blue subset.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2015P3.Coloring, Usa2015P3.IsValid,Exists,Finset,Fin,Eq,Bool,Bool.true,Ne, Usa2015P3.blueCard, Usa2015P3.X,OfNat.ofNatProof uses:
Finset.filter,Membership.mem,Finset.univ,Finset.ext,of_eq_true,Iff,Eq.trans,True,congr,congrArg,And,congrFun',true_and,Finset.filter_congr,Iff.of_eq,forall_congr,implies_congr,Eq.refl,iff_self,Eq.mprand 10 more15 instances, coercions and auxiliary constants left out.
Tactic trace: 8 steps
Open to load the checked before-and-after goal states.
lemma blueCard_ne_zero_X (hne : ∃ T, c T = true) : blueCard c (X c) ≠ 0 := by …
Mentions: Usa2015P3.blueCard, Usa2015P3.X
- lemma
Usa2015P3.X_blueThe intersectionX cof all blue sets is itself blue line 136 sourceSource documentation
The intersection
X cof all blue sets is itself blue.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2015P3.Coloring, Usa2015P3.IsValid,Exists,Finset,Fin,Eq,Bool,Bool.true, Usa2015P3.XProof uses:
And,LE.le,Iff.mp,Ne, Usa2015P3.blueCard,OfNat.ofNat, Usa2015P3.blueCard_ne_zero_iff, Usa2015P3.blueCard_ne_zero_X,Membership.mem, Usa2015P3.mem_X,Finset.Subset.antisymm,Eq.mp,congrArg8 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
lemma X_blue (hne : ∃ T, c T = true) : c (X c) = true := by …
Mentions: Usa2015P3.X
- lemma
Usa2015P3.blueCard_XX cis the only blue subset of itself line 143 sourceSource documentation
X cis the only blue subset of itself.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2015P3.Coloring, Usa2015P3.IsValid,Exists,Finset,Fin,Eq,Bool,Bool.true, Usa2015P3.blueCard, Usa2015P3.X,OfNat.ofNatProof uses:
Finset.filter,Finset.powerset,Singleton.singleton,Finset.ext,Eq.mpr,Iff,Membership.mem,And,LE.le,id,congr,congrArg,Eq.trans,congrFun',Iff.intro,Finset.Subset.antisymm,Iff.mp, Usa2015P3.mem_X,And.intro,Finset.Subset.refland 5 more13 instances, coercions and auxiliary constants left out.
Tactic trace: 12 steps
Open to load the checked before-and-after goal states.
lemma blueCard_X (hne : ∃ T, c T = true) : blueCard c (X c) = 1 := by …
Mentions: Usa2015P3.blueCard, Usa2015P3.X
- lemma
Usa2015P3.blueCard_unionMultiplicativity ofblueCardover pairs of sets whose intersection isX cline 156 sourceSource documentation
Multiplicativity of
blueCardover pairs of sets whose intersection isX c.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2015P3.Coloring, Usa2015P3.IsValid,Finset,Fin,LE.le, Usa2015P3.X,Inter.inter,Exists,Eq,Bool,Bool.true, Usa2015P3.blueCard,Union.union,HMul.hMulProof uses:
Finset.Subset.antisymm,Finset.subset_inter,Eq.symm,Eq.mp,OfNat.ofNat,congrArg,mul_one, Usa2015P3.blueCard_X22 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
lemma blueCard_union {T₁ T₂ : Finset (Fin n)} (h1 : X c ⊆ T₁) (h2 : X c ⊆ T₂) (h3 : T₁ ∩ T₂ ⊆ X c) (hne : ∃ T, c T = true) : blueCard c (T₁ ∪ T₂) = blueCard c T₁ * blueCard c T₂ := by …Mentions: Usa2015P3.X, Usa2015P3.blueCard
- lemma
Usa2015P3.blueCard_singletonX c ∪ {i}has one blue subset if it is red (X citself) and two if it is blue line 165 sourceSource documentation
X c ∪ {i}has one blue subset if it is red (X citself) and two if it is blue.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2015P3.Coloring, Usa2015P3.IsValid,Fin,Not,Membership.mem,Finset, Usa2015P3.X,Exists,Eq,Bool,Bool.true, Usa2015P3.blueCard,Union.union,Singleton.singleton,ite,OfNat.ofNatProof uses:
LE.le,Or,Iff.mp, Usa2015P3.mem_X,SDiff.sdiff,And,Finset.mem_sdiff,Eq.mp,Eq.trans,congrArg,absurd,Iff.mpr,Finset.mem_singleton,EmptyCollection.emptyCollection,Finset.subset_singleton_iff,Or.inl,Finset.Subset.antisymm,propext,Finset.sdiff_eq_empty_iff_subset,Or.inrand 27 more31 instances, coercions and auxiliary constants left out.
Tactic trace: 62 steps
Open to load the checked before-and-after goal states.
lemma blueCard_singleton (i : Fin n) (hi : i ∉ X c) (hne : ∃ T, c T = true) : blueCard c (X c ∪ {i}) = if c (X c ∪ {i}) then 2 else 1 := by …Mentions: Usa2015P3.X, Usa2015P3.blueCard
- lemma
Usa2015P3.blueCard_prodblueCardis multiplicative over the elements of a set disjoint fromX cline 220 sourceSource documentation
blueCardis multiplicative over the elements of a set disjoint fromX c.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2015P3.Coloring, Usa2015P3.IsValid,Finset,Fin,Exists,Eq,Bool,Bool.true,Disjoint, Usa2015P3.X, Usa2015P3.blueCard,Union.union,Finset.prod,Singleton.singletonProof uses:
Finset.induction,EmptyCollection.emptyCollection,of_eq_true,Eq.trans,OfNat.ofNat,True,congr,congrArg,Finset.union_empty, Usa2015P3.blueCard_X,Finset.prod_congr,Insert.insert,Eq.refl,Membership.mem,Finset.union_singleton,eq_self,Not,Disjoint.mono_right,Finset.subset_insert,Iff.mpand 23 more36 instances, coercions and auxiliary constants left out.
Tactic trace: 27 steps
Open to load the checked before-and-after goal states.
lemma blueCard_prod (U : Finset (Fin n)) (hne : ∃ T, c T = true) : Disjoint (X c) U → blueCard c (X c ∪ U) = ∏ i ∈ U, blueCard c (X c ∪ {i}) := by …Mentions: Usa2015P3.X, Usa2015P3.blueCard
- lemma
Usa2015P3.blueCard_powForUdisjoint fromX c, the number of blue subsets ofX c ∪ Uis a power of two determined by which of theX c ∪ {i}are blue line 250 sourceSource documentation
For
Udisjoint fromX c, the number of blue subsets ofX c ∪ Uis a power of two determined by which of theX c ∪ {i}are blue.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2015P3.Coloring, Usa2015P3.IsValid,Finset,Fin,Disjoint, Usa2015P3.X,Exists,Eq,Bool,Bool.true, Usa2015P3.blueCard,Union.union,HPow.hPow,OfNat.ofNat,Finset.card,Finset.filter,Singleton.singletonProof uses:
Membership.mem,ite, Usa2015P3.blueCard_singleton,Iff.mp,Not,Finset.disjoint_right,Eq.mpr,Finset.prod,id,congrArg, Usa2015P3.blueCard_prod,Finset.prod_congr,rfl,HMul.hMul,Finset.prod_ite,of_eq_true,Eq.trans,Insert.insert,True,congrand 11 more35 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
lemma blueCard_pow (U : Finset (Fin n)) (hU : Disjoint (X c) U) (hne : ∃ T, c T = true) : blueCard c (X c ∪ U) = 2 ^ (U.filter fun i => c (X c ∪ {i})).card := by …Mentions: Usa2015P3.X, Usa2015P3.blueCard
- lemma
Usa2015P3.blue_of_mem_intervalEvery set in the interval[X c, X c ∪ B c]is blue line 259 sourceSource documentation
Every set in the interval
[X c, X c ∪ B c]is blue.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2015P3.Coloring, Usa2015P3.IsValid,Exists,Finset,Fin,Eq,Bool,Bool.true,LE.le, Usa2015P3.X,Union.union, Usa2015P3.BProof uses:
SDiff.sdiff,Eq.symm,Finset.union_sdiff_of_subset,Membership.mem,Not,And,Iff.mp,Finset.mem_sdiff,Eq.mpr,Singleton.singleton,id,congrArg,propext, Usa2015P3.mem_B,And.intro,Or,Eq.mp,absurd,And.right,Finset.filterand 28 more29 instances, coercions and auxiliary constants left out.
Tactic trace: 48 steps
Open to load the checked before-and-after goal states.
lemma blue_of_mem_interval (hne : ∃ T, c T = true) {T : Finset (Fin n)} (hXT : X c ⊆ T) (hTB : T ⊆ X c ∪ B c) : c T = true := by …Mentions: Usa2015P3.X, Usa2015P3.B
- lemma
Usa2015P3.interval_of_blueEvery blue set lies in the interval[X c, X c ∪ B c]line 313 sourceSource documentation
Every blue set lies in the interval
[X c, X c ∪ B c].standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2015P3.Coloring, Usa2015P3.IsValid,Exists,Finset,Fin,Eq,Bool,Bool.true,And,LE.le, Usa2015P3.X,Union.union, Usa2015P3.BProof uses:
Membership.mem,Iff.mp, Usa2015P3.mem_X,And.intro,Decidable.byContradiction,Not,Iff.mpr,Or,Finset.mem_union,Or.inl,Or.inr,Singleton.singleton,Bool.false, Usa2015P3.mem_B,Bool.eq_true_of_not_eq_false,SDiff.sdiff,Eq.symm,Finset.union_sdiff_of_subset, Usa2015P3.blueCard,HPow.hPowand 42 more36 instances, coercions and auxiliary constants left out.
Tactic trace: 67 steps
Open to load the checked before-and-after goal states.
lemma interval_of_blue (hne : ∃ T, c T = true) {T : Finset (Fin n)} (hcT : c T = true) : X c ⊆ T ∧ T ⊆ X c ∪ B c := by …Mentions: Usa2015P3.X, Usa2015P3.B
- lemma
Usa2015P3.blue_iffA nontrivial valid coloring is exactly the interval[X c, X c ∪ B c]line 386 sourceSource documentation
A nontrivial valid coloring is exactly the interval
[X c, X c ∪ B c].standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2015P3.Coloring, Usa2015P3.IsValid,Exists,Finset,Fin,Eq,Bool,Bool.true,Iff,And,LE.le, Usa2015P3.X,Union.union, Usa2015P3.BProof uses:
Iff.intro, Usa2015P3.interval_of_blue, Usa2015P3.blue_of_mem_interval11 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
lemma blue_iff (hne : ∃ T, c T = true) (T : Finset (Fin n)) : c T = true ↔ X c ⊆ T ∧ T ⊆ X c ∪ B c := by …Mentions: Usa2015P3.X, Usa2015P3.B
- def
Usa2015P3.colorOfThe coloring whose blue sets are exactly the setsTwithX₀ ⊆ T ⊆ X₀ ∪ B₀line 397 sourceSource documentation
The coloring whose blue sets are exactly the sets
TwithX₀ ⊆ T ⊆ X₀ ∪ B₀.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin, Usa2015P3.ColoringProof uses:
Decidable.decide,And,LE.le,Union.union7 instances, coercions and auxiliary constants left out.
def colorOf (X₀ B₀ : Finset (Fin n)) : Coloring n := fun T => decide (X₀ ⊆ T ∧ T ⊆ X₀ ∪ B₀)
Mentions: Usa2015P3.Coloring
- lemma
Usa2015P3.blueCard_colorOfline 399 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,Disjoint,Eq, Usa2015P3.blueCard, Usa2015P3.colorOf,ite,LE.le,HPow.hPow,OfNat.ofNat,Finset.card,Inter.interProof uses:
dite,Eq.mpr,id,congrArg,ite_eq_left,Finset.filter,Bool,Bool.true,Finset.powerset,Finset.image,Union.union,Finset.ext,Iff,Membership.mem,And,Exists,congr,Eq.trans,congrFun',Finset.filter.congr_simpand 36 more43 instances, coercions and auxiliary constants left out.
Tactic trace: 66 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2015P3.isValid_colorOfline 457 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,Disjoint, Usa2015P3.IsValid, Usa2015P3.colorOfProof uses:
Eq.mpr,Eq,HMul.hMul, Usa2015P3.blueCard,Union.union,Inter.inter,ite,LE.le,HPow.hPow,OfNat.ofNat,Finset.card,id,congrArg, Usa2015P3.blueCard_colorOf,dite,ite_eq_left,Finset.Subset.trans,Finset.subset_union_left,Finset.subset_inter,HAdd.hAddand 14 more26 instances, coercions and auxiliary constants left out.
Tactic trace: 17 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2015P3.isValid_all_redline 478 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2015P3.IsValid,Finset,Fin,Bool.falseProof uses:
Eq, Usa2015P3.blueCard,OfNat.ofNat,Eq.mpr,Finset.card,Finset.filter,Bool,Bool.true,Finset.powerset,id,congrArg,Usa2015P3.blueCard.eq_1,of_eq_true,Eq.trans,True,congrFun',EmptyCollection.emptyCollection,False,Finset.filter_congr,Membership.memand 9 more14 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
- def
Usa2015P3.DisjointPairsThe type of disjoint pairs(X₀, B₀)of finsets ofFin n; these parametrize the nontrivial valid colorings line 490 sourceSource documentation
The type of disjoint pairs
(X₀, B₀)of finsets ofFin n; these parametrize the nontrivial valid colorings.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
Subtype,Prod,Finset,Fin,Disjoint,Prod.fst,Prod.snd2 instances, coercions and auxiliary constants left out.
def DisjointPairs (n : ℕ) : Type := …
- instance
Usa2015P3.(instance at line 493)line 493 source - lemma
Usa2015P3.X_colorOfThe blue interval[X₀, X₀ ∪ B₀]of a disjoint pair determines a valid coloring, and conversely every nontrivial valid coloring arises this way line 497 sourceSource documentation
The blue interval
[X₀, X₀ ∪ B₀]of a disjoint pair determines a valid coloring, and conversely every nontrivial valid coloring arises this way.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,Eq, Usa2015P3.X, Usa2015P3.colorOfProof uses:
Finset.ext,Eq.mpr,Iff,Membership.mem,And,LE.le,Union.union,id,congrFun',congrArg,Eq.trans,Bool,Bool.true,forall_congr,Decidable.decide,implies_congr,decide_eq_true_eq,Eq.refl,Iff.intro,And.introand 3 more10 instances, coercions and auxiliary constants left out.
Tactic trace: 9 steps
Open to load the checked before-and-after goal states.
lemma X_colorOf {n : ℕ} {X₀ B₀ : Finset (Fin n)} : X (colorOf X₀ B₀) = X₀ := by …Mentions: Usa2015P3.X, Usa2015P3.colorOf
- lemma
Usa2015P3.B_colorOfline 507 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,Disjoint,Eq, Usa2015P3.B, Usa2015P3.colorOfProof uses:
Finset.ext,Eq.mpr,Iff,Membership.mem,And,Not, Usa2015P3.X,Bool,Union.union,Singleton.singleton,Bool.true,id,congrArg,propext, Usa2015P3.mem_B, Usa2015P3.X_colorOf,LE.le,congrFun',decide_eq_true_eq,Iff.introand 13 more15 instances, coercions and auxiliary constants left out.
Tactic trace: 17 steps
Open to load the checked before-and-after goal states.
- def
Usa2015P3.fromColoringThe map from a valid coloring to its parametrizing data:nonefor the all-red coloring, and the disjoint pair(X c, B c)otherwise line 527 sourceSource documentation
The map from a valid coloring to its parametrizing data:
nonefor the all-red coloring, and the disjoint pair(X c, B c)otherwise.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2015P3.Coloring, Usa2015P3.IsValid,Option, Usa2015P3.DisjointPairsProof uses:
dite,Exists,Finset,Fin,Eq,Bool,Bool.true,Option.some,Subtype.mk,Prod,Disjoint,Prod.fst,Prod.snd,Prod.mk, Usa2015P3.X, Usa2015P3.B,Not,Option.none7 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
def fromColoring {n : ℕ} (c : Coloring n) (_hv : IsValid c) : Option (DisjointPairs n) := …Mentions: Usa2015P3.Coloring, Usa2015P3.IsValid, Usa2015P3.DisjointPairs
- def
Usa2015P3.toColoringThe valid coloring associated to a parameter: the all-red coloring fornone, and the interval coloringcolorOf X₀ B₀for a disjoint pair(X₀, B₀)line 537 sourceSource documentation
The valid coloring associated to a parameter: the all-red coloring for
none, and the interval coloringcolorOf X₀ B₀for a disjoint pair(X₀, B₀).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Option, Usa2015P3.DisjointPairs, Usa2015P3.ValidColoringsProof uses:
Usa2015P3.toColoring.match_1,Unit,Subtype.mk, Usa2015P3.Coloring, Usa2015P3.IsValid,Finset,Fin,Bool.false, Usa2015P3.isValid_all_red,Disjoint,Prod.fst,Prod.mk,Prod.snd, Usa2015P3.colorOf, Usa2015P3.isValid_colorOf2 instances, coercions and auxiliary constants left out.
def toColoring {n : ℕ} : Option (DisjointPairs n) → ValidColorings n | none => ⟨fun _ => false, isValid_all_red⟩ | some ⟨(X₀, B₀), h⟩ => ⟨colorOf X₀ B₀, isValid_colorOf h⟩ /-- The valid colorings are in bijection with the parameters. -/Mentions: Usa2015P3.DisjointPairs, Usa2015P3.ValidColorings, Usa2015P3.isValid_all_red, h, Usa2015P3.colorOf, Usa2015P3.isValid_colorOf
- def
Usa2015P3.mainEquivThe valid colorings are in bijection with the parameters line 542 sourceSource documentation
The valid colorings are in bijection with the parameters.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Equiv, Usa2015P3.ValidColorings,Option, Usa2015P3.DisjointPairsProof uses:
Equiv.mk, Usa2015P3.fromColoring, Usa2015P3.Coloring, Usa2015P3.IsValid, Usa2015P3.toColoring4 instances, coercions and auxiliary constants left out.
Tactic trace: 46 steps
Open to load the checked before-and-after goal states.
def mainEquiv (n : ℕ) : ValidColorings n ≃ Option (DisjointPairs n) where …
Mentions: Usa2015P3.ValidColorings, Usa2015P3.DisjointPairs
- def
Usa2015P3.disjointPairEquivDisjoint pairs of finsets ofFin ncorrespond to ternary functions: each element is inX₀, inB₀, or in neither line 587 sourceSource documentation
Disjoint pairs of finsets of
Fin ncorrespond to ternary functions: each element is inX₀, inB₀, or in neither.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Equiv, Usa2015P3.DisjointPairs,Fin,OfNat.ofNatProof uses:
Equiv.mk,ite,Membership.mem,Finset,Prod.fst,Prod,Disjoint,Prod.snd,Subtype.mk,Prod.mk,Finset.filter,Eq,Finset.univ15 instances, coercions and auxiliary constants left out.
Tactic trace: 78 steps
Open to load the checked before-and-after goal states.
def disjointPairEquiv (n : ℕ) : DisjointPairs n ≃ (Fin n → Fin 3) where …
Mentions: Usa2015P3.DisjointPairs
- lemma
Usa2015P3.card_disjointPairsline 646 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,Fintype.card, Usa2015P3.DisjointPairs,HPow.hPow,OfNat.ofNatProof uses:
Eq.mpr,Fin,id,congrArg,Fintype.card_congr, Usa2015P3.disjointPairEquiv,Fintype.card_fun,of_eq_true,Eq.trans,True,congrFun',congr,Fintype.card_fin,eq_self15 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2015P3.card_validColoringsline 650 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,Fintype.card, Usa2015P3.ValidColorings,HAdd.hAdd,HPow.hPow,OfNat.ofNatProof uses:
Eq.mpr,Option, Usa2015P3.DisjointPairs,id,congrArg,Fintype.card_congr, Usa2015P3.mainEquiv,Fintype.card_option, Usa2015P3.card_disjointPairs,Eq.refl18 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- determine
Usa2015P3.NumberOfColoringsline 655 sourcestandard axioms: propext what this means
Statement uses:
NatProof uses:
HAdd.hAdd,HPow.hPow,OfNat.ofNat7 instances, coercions and auxiliary constants left out.
- problem
Usa2015P3.usa2015_p3line 657 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,Fintype.card, Usa2015P3.ValidColorings, Usa2015P3.NumberOfColoringsProof uses: Usa2015P3.card_validColorings
1 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.