-- Mathlib/AlgebraicTopology/SimplexCategory/MorphismProperty.lean
lemma Truncated.morphismProperty_eq_top
    {d : ℕ} (W : MorphismProperty (Truncated d)) [W.IsMultiplicative]
    (δ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 2)),
    W (SimplexCategory.δ (n := n) i : ⟨.mk n, by dsimp; omega⟩ ⟶
      ⟨.mk (n + 1), by dsimp; omega⟩))
    (σ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 1)),
    W (SimplexCategory.σ (n := n) i : ⟨.mk (n + 1), by dsimp; omega⟩ ⟶
      ⟨.mk n, by dsimp; omega⟩)) :
    W = ⊤

Proof state:
d : ℕ
W : MorphismProperty (Truncated d)
inst✝ : W.IsMultiplicative
δ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 2)), W (δ i)
n : ℕ
hn : n < d
i : Fin (n + 1)
⊢ (mk (n + 1)).len ≤ d

Tactic:
dsimp

Result:
d : ℕ
W : MorphismProperty (Truncated d)
inst✝ : W.IsMultiplicative
δ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 2)), W (δ i)
n : ℕ
hn : n < d
i : Fin (n + 1)
⊢ n + 1 ≤ d

Proof state:
case neg.zero
d : ℕ
W : MorphismProperty (Truncated d)
inst✝ : W.IsMultiplicative
δ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 2)), W (δ i)
σ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 1)), W (σ i)
c : ℕ
hc :
  ∀ (a : ℕ) (ha : a ≤ d) (b : ℕ) (hb : b ≤ d) (f : { obj := mk a, property := ha } ⟶ { obj := mk b, property := hb }),
    a + b = c → W f
a : ℕ
ha : a ≤ d
hb : 0 ≤ d
f : { obj := mk a, property := ha } ⟶ { obj := mk 0, property := hb }
h : a + 0 = c + 1
f' : mk a ⟶ mk 0 := f
h₁ : ¬Function.Surjective ⇑(Hom.toOrderHom f')
⊢ W f

Tactic:
exact (h₁ (fun _ ↦ ⟨0, Subsingleton.elim (α := Fin 1) _ _⟩)).elim

Result:
no goals

Proof state:
case h.mk.mk
d : ℕ
W : MorphismProperty (Truncated d)
inst✝ : W.IsMultiplicative
δ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 2)), W (δ i)
σ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 1)), W (σ i)
a : SimplexCategory
ha : a.len ≤ d
b : SimplexCategory
hb : b.len ≤ d
f : { obj := a, property := ha } ⟶ { obj := b, property := hb }
⊢ W f

Tactic:
induction' a using SimplexCategory.rec with a

Result:
case h.mk.mk.h
d : ℕ
W : MorphismProperty (Truncated d)
inst✝ : W.IsMultiplicative
δ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 2)), W (δ i)
σ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 1)), W (σ i)
b : SimplexCategory
hb : b.len ≤ d
a : ℕ
ha : (mk a).len ≤ d
f : { obj := mk a, property := ha } ⟶ { obj := b, property := hb }
⊢ W f

Proof state:
d : ℕ
W : MorphismProperty (Truncated d)
inst✝ : W.IsMultiplicative
n : ℕ
hn : n < d
i : Fin (n + 2)
⊢ (mk (n + 1)).len ≤ d

Tactic:
dsimp

Result:
d : ℕ
W : MorphismProperty (Truncated d)
inst✝ : W.IsMultiplicative
n : ℕ
hn : n < d
i : Fin (n + 2)
⊢ n + 1 ≤ d

Proof state:
d : ℕ
W : MorphismProperty (Truncated d)
inst✝ : W.IsMultiplicative
δ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 2)), W (δ i)
σ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 1)), W (σ i)
b : ℕ
hb : b ≤ d
ha : 0 ≤ d
f : { obj := mk 0, property := ha } ⟶ { obj := mk b, property := hb }
h : 0 + b = 0
⊢ b = 0

Tactic:
omega

Result:
no goals

Proof state:
case pos
d : ℕ
W : MorphismProperty (Truncated d)
inst✝ : W.IsMultiplicative
δ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 2)), W (δ i)
σ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 1)), W (σ i)
c : ℕ
hc :
  ∀ (a : ℕ) (ha : a ≤ d) (b : ℕ) (hb : b ≤ d) (f : { obj := mk a, property := ha } ⟶ { obj := mk b, property := hb }),
    a + b = c → W f
a : ℕ
ha : a ≤ d
b : ℕ
hb : b ≤ d
f : { obj := mk a, property := ha } ⟶ { obj := mk b, property := hb }
h : a + b = c + 1
f' : mk a ⟶ mk b := f
h₁ : Epi f'
h₂ : Mono f'
⊢ W f

Tactic:
obtain rfl : a = b := le_antisymm (len_le_of_mono h₂) (len_le_of_epi h₁)

Result:
case pos
d : ℕ
W : MorphismProperty (Truncated d)
inst✝ : W.IsMultiplicative
δ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 2)), W (δ i)
σ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 1)), W (σ i)
c : ℕ
hc :
  ∀ (a : ℕ) (ha : a ≤ d) (b : ℕ) (hb : b ≤ d) (f : { obj := mk a, property := ha } ⟶ { obj := mk b, property := hb }),
    a + b = c → W f
a : ℕ
ha hb : a ≤ d
f : { obj := mk a, property := ha } ⟶ { obj := mk a, property := hb }
h : a + a = c + 1
f' : mk a ⟶ mk a := f
h₁ : Epi f'
h₂ : Mono f'
⊢ W f

Proof state:
case h.mk.mk
d : ℕ
W : MorphismProperty (Truncated d)
inst✝ : W.IsMultiplicative
δ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 2)), W (δ i)
σ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 1)), W (σ i)
a : SimplexCategory
ha : a.len ≤ d
b : SimplexCategory
hb : b.len ≤ d
f : { obj := a, property := ha } ⟶ { obj := b, property := hb }
⊢ W f ↔ ⊤ f

Tactic:
simp only [MorphismProperty.top_apply, iff_true]

Result:
case h.mk.mk
d : ℕ
W : MorphismProperty (Truncated d)
inst✝ : W.IsMultiplicative
δ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 2)), W (δ i)
σ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 1)), W (σ i)
a : SimplexCategory
ha : a.len ≤ d
b : SimplexCategory
hb : b.len ≤ d
f : { obj := a, property := ha } ⟶ { obj := b, property := hb }
⊢ W f

Proof state:
case h.mk.mk.h.h
d : ℕ
W : MorphismProperty (Truncated d)
inst✝ : W.IsMultiplicative
δ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 2)), W (δ i)
σ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 1)), W (σ i)
a : ℕ
ha : (mk a).len ≤ d
b : ℕ
hb : (mk b).len ≤ d
f : { obj := mk a, property := ha } ⟶ { obj := mk b, property := hb }
⊢ W f

Tactic:
dsimp at ha hb

Result:
case h.mk.mk.h.h
d : ℕ
W : MorphismProperty (Truncated d)
inst✝ : W.IsMultiplicative
δ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 2)), W (δ i)
σ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 1)), W (σ i)
a : ℕ
ha : a ≤ d
b : ℕ
hb : b ≤ d
f : { obj := mk a, property := ha } ⟶ { obj := mk b, property := hb }
⊢ W f

Proof state:
case pos
d : ℕ
W : MorphismProperty (Truncated d)
inst✝ : W.IsMultiplicative
δ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 2)), W (δ i)
σ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 1)), W (σ i)
c : ℕ
hc :
  ∀ (a : ℕ) (ha : a ≤ d) (b : ℕ) (hb : b ≤ d) (f : { obj := mk a, property := ha } ⟶ { obj := mk b, property := hb }),
    a + b = c → W f
a : ℕ
ha hb : a ≤ d
f : { obj := mk a, property := ha } ⟶ { obj := mk a, property := hb }
h : a + a = c + 1
f' : mk a ⟶ mk a := f
h₁ : Epi f'
h₂ : Mono f'
⊢ W f

Tactic:
obtain rfl : f = 𝟙 _ := eq_id_of_mono f'

Result:
case pos
d : ℕ
W : MorphismProperty (Truncated d)
inst✝ : W.IsMultiplicative
δ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 2)), W (δ i)
σ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 1)), W (σ i)
c : ℕ
hc :
  ∀ (a : ℕ) (ha : a ≤ d) (b : ℕ) (hb : b ≤ d) (f : { obj := mk a, property := ha } ⟶ { obj := mk b, property := hb }),
    a + b = c → W f
a : ℕ
ha hb : a ≤ d
h : a + a = c + 1
f' : mk a ⟶ mk a := 𝟙 { obj := mk a, property := ha }
h₁ : Epi f'
h₂ : Mono f'
⊢ W (𝟙 { obj := mk a, property := ha })

Proof state:
case neg.succ.intro.intro
d : ℕ
W : MorphismProperty (Truncated d)
inst✝ : W.IsMultiplicative
δ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 2)), W (δ i)
σ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 1)), W (σ i)
c : ℕ
hc :
  ∀ (a : ℕ) (ha : a ≤ d) (b : ℕ) (hb : b ≤ d) (f : { obj := mk a, property := ha } ⟶ { obj := mk b, property := hb }),
    a + b = c → W f
a : ℕ
ha : a ≤ d
b : ℕ
hb : b + 1 ≤ d
f : { obj := mk a, property := ha } ⟶ { obj := mk (b + 1), property := hb }
h : a + (b + 1) = c + 1
f' : mk a ⟶ mk (b + 1) := f
h₁ : ¬Function.Surjective ⇑(Hom.toOrderHom f')
i : Fin (b + 2)
g' : mk a ⟶ mk b
hf' : f' = g' ≫ δ i
⊢ W f

Tactic:
obtain rfl : f = (g' : _ ⟶ ⟨mk b, by dsimp; omega⟩) ≫ δ i := hf'

Result:
case neg.succ.intro.intro
d : ℕ
W : MorphismProperty (Truncated d)
inst✝ : W.IsMultiplicative
δ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 2)), W (δ i)
σ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 1)), W (σ i)
c : ℕ
hc :
  ∀ (a : ℕ) (ha : a ≤ d) (b : ℕ) (hb : b ≤ d) (f : { obj := mk a, property := ha } ⟶ { obj := mk b, property := hb }),
    a + b = c → W f
a : ℕ
ha : a ≤ d
b : ℕ
hb : b + 1 ≤ d
h : a + (b + 1) = c + 1
i : Fin (b + 2)
g' : mk a ⟶ mk b
f' : mk a ⟶ mk (b + 1) := g' ≫ δ i
h₁ : ¬Function.Surjective ⇑(Hom.toOrderHom f')
⊢ W (g' ≫ δ i)