Compfiles/Imo1971P6.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
8 declarations, 0 contain sorry, 0 declared as axioms
International Mathematical Olympiad 1971, Problem 6
Let $A = (a_{ij})$ be an $n \times n$ matrix with non-negative integer entries. Suppose that for all $i, j$, if $a_{ij} = 0$, then the sum of the elements in the $i$-th row plus the sum of the elements in the $j$-th column is at least $n$. Prove that the sum of all elements in the matrix is at least $n^2 / 2$.
Imported by 1 file
- def
Imo1971P6.rowSumDefinitions of row sum, column sum, and total sum line 36 sourceSource comment
Definitions of row sum, column sum, and total sumstandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Matrix,FinProof uses:
Finset.sum,Finset.univ2 instances, coercions and auxiliary constants left out.
def rowSum (i : Fin n) : ℕ := ∑ j, A i j
- def
Imo1971P6.colSumline 37 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Matrix,FinProof uses:
Finset.sum,Finset.univ,Matrix.transpose2 instances, coercions and auxiliary constants left out.
- def
Imo1971P6.totalSumline 38 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Matrix,FinProof uses:
Finset.sum,Finset.univ2 instances, coercions and auxiliary constants left out.
- lemma
Imo1971P6.totalSum_eq_rowSum_sumBasic lemmas connecting total sum to row/col sums line 41 sourceSource comment
Basic lemmas connecting total sum to row/col sumsstandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Matrix,Fin,Eq, Imo1971P6.totalSum,Finset.sum,Finset.univ, Imo1971P6.rowSumProof uses:
rfl2 instances, coercions and auxiliary constants left out.
lemma totalSum_eq_rowSum_sum : totalSum A = ∑ i, rowSum A i := rfl
Mentions: Imo1971P6.totalSum, Imo1971P6.rowSum
- lemma
Imo1971P6.totalSum_eq_colSum_sumline 43 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Matrix,Fin,Eq, Imo1971P6.totalSum,Finset.sum,Finset.univ, Imo1971P6.colSumProof uses:
Finset.sum_comm4 instances, coercions and auxiliary constants left out.
- theorem
Imo1971P6.totalSum_transpose_eqline 45 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Matrix,Fin,Eq, Imo1971P6.totalSum,Matrix.transposeProof uses:
id,Finset.sum_comm,Finset.univ2 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo1971P6.auxAuxiliary lemma: The inequality holds if there exists a row with sumxsuch thatxis less than or equal to all row sums and column sums line 51 sourceSource documentation
Auxiliary lemma: The inequality holds if there exists a row with sum
xsuch thatxis less than or equal to all row sums and column sums.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Matrix,Fin,LT.lt,OfNat.ofNat,Eq,GE.ge,HAdd.hAdd, Imo1971P6.rowSum, Imo1971P6.colSum,LE.le,Exists,HMul.hMul, Imo1971P6.totalSum,HPow.hPowProof uses:
dite,Trans.trans,Finset.sum,Finset.univ, Imo1971P6.totalSum_eq_rowSum_sum,Finset.sum_le_sum,Membership.mem,Finset,of_eq_true,Eq.trans,True,congrFun',congrArg,HSMul.hSMul,Finset.card,Finset.sum_const,Fintype.card_fin,eq_self,Eq.mpr,Intand 103 more139 instances, coercions and auxiliary constants left out.
Tactic trace: 49 steps
Open to load the checked before-and-after goal states.
lemma aux {n : ℕ} (A : Matrix (Fin n) (Fin n) ℕ) (n_pos : 0 < n) (h_cond : ∀ i j : Fin n, A i j = 0 → rowSum A i + colSum A j ≥ n) (x : ℕ) (h_min_row : ∀ i, x ≤ rowSum A i) (h_min_col : ∀ j, x ≤ colSum A j) (h_exists_row : ∃ i, rowSum A i = x) : 2 * totalSum A ≥ n^2 := by …Mentions: Imo1971P6.rowSum, Imo1971P6.colSum, Imo1971P6.totalSum
- problem
Imo1971P6.imo1971_p6line 101 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Matrix,Fin,LT.lt,OfNat.ofNat,Eq,GE.ge,HAdd.hAdd, Imo1971P6.rowSum, Imo1971P6.colSum,HMul.hMul, Imo1971P6.totalSum,HPow.hPowProof uses:
Finset,Union.union,Finset.image,Finset.univ,Finset.Nonempty,Exists.intro,Membership.mem,Fin.mk,of_eq_true,Eq.trans,Or,True,Exists,congr,congrArg,And,funext,congrFun',true_and,true_orand 13 more40 instances, coercions and auxiliary constants left out.
Tactic trace: 37 steps
Open to load the checked before-and-after goal states.