Compfiles/Usa1982P1.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
12 declarations, 0 contain sorry, 0 declared as axioms
USA Mathematical Olympiad 1982, Problem 1
A graph has 1982 points. Given any four points, there is at least one joined to the other three. What is the smallest number of points which are joined to 1981 points?
Imports (5)
Imported by 1 file
- def
Usa1982P1.FourPointPropertyThe hypothesis of the problem: among any four vertices of the graph, some vertex is adjacent to the other three line 33 sourceSource documentation
The hypothesis of the problem: among any four vertices of the graph, some vertex is adjacent to the other three.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
SimpleGraph,Fin,OfNat.ofNat,NatProof uses:
Finset,Eq,Finset.card,Exists,And,Membership.mem,Ne,SimpleGraph.Adj4 instances, coercions and auxiliary constants left out.
def FourPointProperty (G : SimpleGraph (Fin 1982)) : Prop := …
- def
Usa1982P1.IsUniversalA vertex is universal if it is joined to all 1981 other vertices line 37 sourceSource documentation
A vertex is universal if it is joined to all 1981 other vertices.
no axioms what this means
Statement uses:
SimpleGraph,Fin,OfNat.ofNat,NatProof uses:
Ne,SimpleGraph.Adj2 instances, coercions and auxiliary constants left out.
def IsUniversal (G : SimpleGraph (Fin 1982)) (v : Fin 1982) : Prop := …
- determine
Usa1982P1.solutionline 40 sourceno axioms what this means
Statement uses:
NatProof uses:
OfNat.ofNat1 instances, coercions and auxiliary constants left out.
- lemma
Usa1982P1.card_four_of_distinctA finset of four distinct vertices has cardinality four line 45 sourceSource documentation
A finset of four distinct vertices has cardinality four.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,Ne,Eq,Finset.card,Insert.insert,Finset,Singleton.singletonProof uses:
Eq.mpr,HAdd.hAdd,id,congrArg,Finset.card_insert_of_notMem,of_eq_true,Not,Membership.mem,Eq.trans,False,True,Or,congr,eq_false,or_self,not_false_eq_true,Finset.card_singleton,Eq.refl14 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
lemma card_four_of_distinct {a b c d : Fin 1982} (hab : a ≠ b) (hac : a ≠ c) (had : a ≠ d) (hbc : b ≠ c) (hbd : b ≠ d) (hcd : c ≠ d) : ({a, b, c, d} : Finset (Fin 1982)).card = 4 := by … - lemma
Usa1982P1.card_universal_geLower bound: in any graph satisfyingFourPointProperty, at most three vertices fail to be universal, so at least 1979 vertices are universal line 64 sourceSource documentation
Lower bound: in any graph satisfying
FourPointProperty, at most three vertices fail to be universal, so at least 1979 vertices are universal.The proof follows the official solution. Suppose four vertices were not universal. Let
Abe one of them and letBbe a vertex not joined toA. Then any two other verticesX, Ymust be joined (else no vertex of{A, B, X, Y}would be joined to the other three). Take two further non-universal verticesC, D ∉ {A, B}. Each ofC, Dis joined to every vertex except possiblyAandB, and being non-universal it must miss one of those. But then no vertex of{A, B, C, D}is joined to the other three, a contradiction.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
SimpleGraph,Fin,OfNat.ofNat,Nat, Usa1982P1.FourPointProperty,LE.le,Finset.card,Finset.filter, Usa1982P1.IsUniversal,Classical.propDecidable,Finset.univProof uses:
Finset,Not,Eq,rfl,HAdd.hAdd,Finset.card_filter_add_card_filter_not,Eq.mp,Fintype.card,congrArg,Fintype.card_fin,Finset.card_univ,Decidable.byContradiction,Membership.mem,Finset.Nonempty,False,Iff.mp,LT.lt,Finset.card_pos,And.right,Andand 35 more42 instances, coercions and auxiliary constants left out.
Tactic trace: 105 steps
Open to load the checked before-and-after goal states.
lemma card_universal_ge (G : SimpleGraph (Fin 1982)) (hG : FourPointProperty G) : 1979 ≤ (Finset.univ.filter (IsUniversal G)).card := by …Mentions: Usa1982P1.FourPointProperty, Usa1982P1.IsUniversal
- lemma
Usa1982P1.card_threeThe finset{0, 1, 2}of vertices has three elements line 153 sourceSource documentation
The finset
{0, 1, 2}of vertices has three elements.standard axioms: Quot.sound, propext what this means
Statement uses:
Eq,Nat,Finset.card,Fin,OfNat.ofNat,Insert.insert,Finset,Singleton.singletonProof uses:
of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl13 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
lemma card_three : ({0, 1, 2} : Finset (Fin 1982)).card = 3 := by decide - def
Usa1982P1.extremalAdjAdjacency in the extremal graph: all pairs of distinct vertices except0—1and0—2line 157 sourceSource documentation
Adjacency in the extremal graph: all pairs of distinct vertices except
0—1and0—2.standard axioms: propext what this means
Statement uses:
Fin,OfNat.ofNat,NatProof uses:
And,Ne,Not,Or,Eq4 instances, coercions and auxiliary constants left out.
def extremalAdj (i j : Fin 1982) : Prop := …
- def
Usa1982P1.extremalGraphThe extremal graph: the complete graph onFin 1982with the two edges0—1and0—2removed line 162 sourceSource documentation
The extremal graph: the complete graph on
Fin 1982with the two edges0—1and0—2removed.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
SimpleGraph,Fin,OfNat.ofNat,NatProof uses:
SimpleGraph.mk, Usa1982P1.extremalAdj4 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
def extremalGraph : SimpleGraph (Fin 1982) where …
- lemma
Usa1982P1.extremal_universal_iffIn the extremal graph, the universal vertices are exactly those outside{0, 1, 2}line 169 sourceSource documentation
In the extremal graph, the universal vertices are exactly those outside
{0, 1, 2}.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,Iff, Usa1982P1.IsUniversal, Usa1982P1.extremalGraph,And,NeProof uses:
Iff.intro,Decidable.byContradiction,Eq,Not,Or,Iff.mp,Decidable.not_and_iff_not_or_not',Iff.mpr,Classical.or_iff_not_imp_left,False.elim,Decidable.of_not_not,False, Usa1982P1.extremalAdj,And.right,Or.inl,And.intro,rfl,of_decide_eq_true,id,Booland 7 more13 instances, coercions and auxiliary constants left out.
Tactic trace: 32 steps
Open to load the checked before-and-after goal states.
lemma extremal_universal_iff (v : Fin 1982) : IsUniversal extremalGraph v ↔ v ≠ 0 ∧ v ≠ 1 ∧ v ≠ 2 := by …Mentions: Usa1982P1.IsUniversal, Usa1982P1.extremalGraph
- lemma
Usa1982P1.extremal_fourPointThe extremal graph satisfies the four-point condition: any four vertices contain one outside{0, 1, 2}, and that vertex is joined to all others line 195 sourceSource documentation
The extremal graph satisfies the four-point condition: any four vertices contain one outside
{0, 1, 2}, and that vertex is joined to all others.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Usa1982P1.FourPointProperty, Usa1982P1.extremalGraph
Proof uses:
Finset,Fin,OfNat.ofNat,Nat,Eq,Finset.card,And,Membership.mem,Not,Insert.insert,Singleton.singleton,Exists,Ne,SimpleGraph.Adj,Decidable.byContradiction,LE.le,Exists.intro,And.intro,Finset.card_le_card,absurdand 14 more29 instances, coercions and auxiliary constants left out.
Tactic trace: 14 steps
Open to load the checked before-and-after goal states.
lemma extremal_fourPoint : FourPointProperty extremalGraph := by …
Mentions: Usa1982P1.FourPointProperty, Usa1982P1.extremalGraph
- lemma
Usa1982P1.extremal_countThe extremal graph has exactly 1979 universal vertices line 211 sourceSource documentation
The extremal graph has exactly 1979 universal vertices.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat,Finset.card,Fin,OfNat.ofNat,Finset.filter, Usa1982P1.IsUniversal, Usa1982P1.extremalGraph,Classical.propDecidable,Finset.univProof uses:
Finset,SDiff.sdiff,Insert.insert,Singleton.singleton,Finset.ext,Eq.mpr,Iff,Membership.mem,Not,Or,id,congr,congrArg,Eq.trans,And,True,congrFun',true_and,Ne,propextand 16 more22 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
lemma extremal_count : (Finset.univ.filter (IsUniversal extremalGraph)).card = 1979 := by …Mentions: Usa1982P1.IsUniversal, Usa1982P1.extremalGraph
- problem
Usa1982P1.usa1982_p1line 225 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
IsLeast,Nat,Set.ofPred,Exists,SimpleGraph,Fin,OfNat.ofNat,And, Usa1982P1.FourPointProperty,Eq,Finset.card,Finset.filter, Usa1982P1.IsUniversal,Classical.propDecidable,Finset.univ, Usa1982P1.solutionProof uses:
And.intro,Membership.mem,Set,lowerBounds,Exists.intro, Usa1982P1.extremalGraph, Usa1982P1.extremal_fourPoint,Eq.symm, Usa1982P1.extremal_count,LE.le,Eq.mpr,id,congrArg, Usa1982P1.card_universal_ge9 instances, coercions and auxiliary constants left out.
Tactic trace: 8 steps
Open to load the checked before-and-after goal states.