Documentation

ForbiddenMatrix.ExtremalFunction

noncomputable def density {m n : } (M : Fin mFin nProp) :
Equations
Instances For
    theorem density_def {n : } (M : Fin nFin nProp) [DecidableRel M] :
    density M = {x : Fin n × Fin n | match x with | (i, j) => M i j}.card
    theorem density_mono {m n : } {M N : Fin mFin nProp} (h : ∀ (i : Fin m) (j : Fin n), M i jN i j) :
    noncomputable def row_density {n : } (M : Fin nFin nProp) (i : Fin n) :
    Equations
    Instances For
      noncomputable def col_density {n : } (M : Fin nFin nProp) (j : Fin n) :
      Equations
      Instances For
        noncomputable def ex {α : Type u_1} {β : Type u_2} [LinearOrder α] [LinearOrder β] (P : αβProp) (n : ) :
        Equations
        Instances For
          @[simp]
          theorem ex_zero {α : Type u_1} {β : Type u_2} [LinearOrder α] [LinearOrder β] (P : αβProp) :
          ex P 0 = 0
          theorem ex_le_iff {α : Type u_1} {β : Type u_2} [LinearOrder α] [LinearOrder β] {P : αβProp} {m n : } :
          ex P n m ∀ (M : Fin nFin nProp), ¬Contains P Mdensity M m
          theorem le_ex_iff {α : Type u_1} {β : Type u_2} [LinearOrder α] [LinearOrder β] (P : αβProp) (P_nonempty : ∃ (a : α) (b : β), P a b) {m n : } :
          m ex P n ∃ (M : Fin nFin nProp), ¬Contains P M m density M
          theorem ex_le_sq {α : Type u_1} {β : Type u_2} [LinearOrder α] [LinearOrder β] {P : αβProp} (n : ) :
          ex P n n ^ 2
          theorem density_le_ex_of_not_contains {α : Type u_1} {β : Type u_2} [LinearOrder α] [LinearOrder β] {n : } {P : αβProp} (M : Fin nFin nProp) (AvoidP : ¬Contains P M) :
          density M ex P n
          theorem split_density_to_rows {n : } (M : Fin nFin nProp) :
          density M = i : Fin n, row_density M i
          theorem density_by_rows_ub {n c : } (M : Fin nFin nProp) (h_row_density_bounded : ∀ (i : Fin n), row_density M i c) :
          density M n * c
          theorem split_density_to_cols {n : } (M : Fin nFin nProp) :
          density M = i : Fin n, col_density M i
          theorem density_by_cols_ub {n c : } (M : Fin nFin nProp) (h_col_bounded : ∀ (i : Fin n), col_density M i c) :
          density M n * c
          def rectPtset (n a₁ b₁ a₂ b₂ : ) :
          Equations
          Instances For
            noncomputable def rectPtsetMatrix {n : } (M : Fin nFin nProp) (a₁ b₁ a₂ b₂ : ) :
            Equations
            Instances For
              noncomputable def rectPtsetSubsetMatrix {n : } (M : Fin nFin nProp) (R C : Finset (Fin n)) :
              Equations
              Instances For
                theorem card_interval {n : } (x y : ) (hy : y n) :
                {a : Fin n | a Finset.Ico x y}.card = (Finset.Ico x y).card
                @[simp]
                theorem card_rectPtSet (n a₁ b₁ a₂ b₂ : ) (h : b₁ n b₂ n) :
                (rectPtset n a₁ b₁ a₂ b₂).card = (b₁ - a₁) * (b₂ - a₂)
                @[simp]
                theorem card_rectPtsetSubsetMatrix {n : } (M : Fin nFin nProp) (R C : Finset (Fin n)) :
                theorem density_mk_mem_product {n : } (I J : Finset (Fin n)) :
                (density fun (i j : Fin n) => (i, j) I ×ˢ J) = I.card * J.card
                theorem den_all1_matrix_row_subset {n : } (I : Finset (Fin n)) :
                have M := fun (i j : Fin n) => (i, j) I ×ˢ Finset.univ; density M = n * I.card
                theorem den_all1_matrix_col_subset {n : } (I : Finset (Fin n)) :
                have M := fun (i j : Fin n) => (i, j) Finset.univ ×ˢ I; density M = n * I.card
                theorem den_all1_matrix_column_interval {n : } (a b : Fin n) :
                have I := {x : Fin n | x Finset.Icc a b}; have M := fun (i j : Fin n) => (i, j) Finset.univ ×ˢ I; density M = n * (b + 1 - a)
                theorem den_all1_matrix_row_interval {n : } (a b : Fin n) :
                have I := {x : Fin n | x Finset.Icc a b}; have M := fun (i j : Fin n) => (i, j) I ×ˢ Finset.univ; density M = n * (b + 1 - a)
                theorem den_all1_matrix_single_row {n : } (x : Fin n) :
                have M := fun (i x_1 : Fin n) => i = x; density M = n
                theorem den_all1_matrix_single_col {n : } (x : Fin n) :
                have M := fun (x_1 j : Fin n) => j = x; density M = n
                theorem le_ex_self_of_two_points {α : Type u_1} {β : Type u_2} [LinearOrder α] [LinearOrder β] (P : αβProp) (n : ) (hP : ∃ (x : α × β) (y : α × β), P x.1 x.2 P y.1 y.2 x y) :
                n ex P n
                theorem exists_av_and_ex_eq {α : Type u_1} {β : Type u_2} [LinearOrder α] [LinearOrder β] {n : } {P : αβProp} (P_nonempty : ∃ (a : α) (b : β), P a b) :
                ∃ (M : Fin nFin nProp), ¬Contains P M ex P n = density M
                theorem split_density {n : } (M Pred : Fin nFin nProp) :
                have M1 := fun (i j : Fin n) => M i j Pred i j; have M2 := fun (i j : Fin n) => M i j ¬Pred i j; density M = density M1 + density M2