Compfiles/Usa1976P1.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
7 declarations, 0 contain sorry, 0 declared as axioms
USA Mathematical Olympiad 1976, Problem 1
The squares of a 4 x 7 chess board are colored red or blue. Show that however the coloring is done, we can find a rectangle with four distinct corner squares all the same color. Find a counter-example to show that this is not true for a 4 x 6 board.
Imports (4)
Imported by 1 file
- def
Usa1976P1.HasMonoRectangleDocumented declaration: HasMonoRectangle line 32 sourceSource documentation
A coloring (true = red, false = blue) of an
m × nboard has a monochromatic rectangle if there are two distinct rows and two distinct columns whose four intersection squares all have the same color.no axioms what this means
Statement uses:
Nat,Fin,BoolProof uses:
Exists,And,Ne,Eqdef HasMonoRectangle {m n : ℕ} (c : Fin m → Fin n → Bool) : Prop := … - determine
Usa1976P1.counterexampleA 4 x 6 coloring with no monochromatic rectangle line 48 sourceSource documentation
A 4 x 6 coloring with no monochromatic rectangle. Written row by row, with
true= red:R B R B R B R B B R B R B R R B B R B R B R R BEvery column has two red and two blue squares, and no two columns have their red squares in the same two rows or their blue squares in the same two rows, so there can be no monochromatic rectangle.
standard axioms: propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,BoolProof uses:
Matrix.vecCons,Bool.true,Bool.false,Matrix.vecEmpty2 instances, coercions and auxiliary constants left out.
determine counterexample : Fin 4 → Fin 6 → Bool := …
- def
Usa1976P1.monoTriplesThe monochromatic pairs of rows in columnj, tagged with their color:(r1, r2, b)meansr1 < r2and both squares(r1, j)and(r2, j)have colorbline 59 sourceSource documentation
The monochromatic pairs of rows in column
j, tagged with their color:(r1, r2, b)meansr1 < r2and both squares(r1, j)and(r2, j)have colorb.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,Bool,Finset,ProdProof uses:
Finset.filter,And,LT.lt,Prod.fst,Prod.snd,Eq,Finset.univ9 instances, coercions and auxiliary constants left out.
def monoTriples (c : Fin 4 → Fin 7 → Bool) (j : Fin 7) : Finset (Fin 4 × Fin 4 × Bool) := … - lemma
Usa1976P1.two_le_card_monoTriplesDocumented declaration: two_le_card_monoTriples line 67 sourceSource documentation
In any column of 4 squares colored with 2 colors, if
ksquares are red then4 - kare blue, so the number of monochromatic pairs of squares isk.choose 2 + (4 - k).choose 2 ≥ 1 + 1 = 2. There are only 16 possible columns, so we check them all.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,Bool,LE.le,Finset.card,Prod, Usa1976P1.monoTriplesProof uses:
Finset.filter,And,LT.lt,Prod.fst,Prod.snd,Eq,Finset.univ,of_decide_eq_true,id,Decidable.decide,Bool.true,Eq.refl15 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
lemma two_le_card_monoTriples (c : Fin 4 → Fin 7 → Bool) (j : Fin 7) : 2 ≤ (monoTriples c j).card := by …Mentions: Usa1976P1.monoTriples
- lemma
Usa1976P1.card_colored_rowPairsThere are6pairs of distinct rows and2colors, hence12colored pairs of rows line 77 sourceSource documentation
There are
6pairs of distinct rows and2colors, hence12colored pairs of rows.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat,Finset.card,Prod,Fin,OfNat.ofNat,Bool,Finset.filter,LT.lt,Prod.fst,Prod.snd,Finset.univProof uses:
of_decide_eq_true,id,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_colored_rowPairs : (Finset.univ.filter fun t : Fin 4 × Fin 4 × Bool ↦ t.1 < t.2.1).card = 12 := by … - problem
Usa1976P1.usa1976_p1_firstline 83 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,Bool, Usa1976P1.HasMonoRectangleProof uses:
id,Decidable.byContradiction,Exists,And,Ne,Eq,Not,Set.PairwiseDisjoint,Finset,Prod,Finset.univ, Usa1976P1.monoTriples,Membership.mem,Set,Eq.mpr,Function.onFun,Disjoint,Prod.mk,Exists.intro,And.introand 29 more37 instances, coercions and auxiliary constants left out.
Tactic trace: 25 steps
Open to load the checked before-and-after goal states.
- problem
Usa1976P1.usa1976_p1_secondline 118 sourcestandard axioms: Quot.sound, propext what this means
Statement uses:
Not, Usa1976P1.HasMonoRectangle,OfNat.ofNat,Nat, Usa1976P1.counterexampleProof uses:
id,of_decide_eq_true,Exists,Fin,Bool,And,Ne,Eq,Decidable.decide,Bool.true,Eq.refl8 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.