-- 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:
case neg
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₁ : Function.Surjective ⇑(Hom.toOrderHom f')
h₂ : ¬Function.Injective ⇑(Hom.toOrderHom f')
⊢ W f

Tactic:
obtain _ | a := a

Result:
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
b : ℕ
hb : b ≤ d
ha : 0 ≤ d
f : { obj := mk 0, property := ha } ⟶ { obj := mk b, property := hb }
h : 0 + b = c + 1
f' : mk 0 ⟶ mk b := f
h₁ : Function.Surjective ⇑(Hom.toOrderHom f')
h₂ : ¬Function.Injective ⇑(Hom.toOrderHom f')
⊢ W f

case neg.succ
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
b : ℕ
hb : b ≤ d
a : ℕ
ha : a + 1 ≤ d
f : { obj := mk (a + 1), property := ha } ⟶ { obj := mk b, property := hb }
h : a + 1 + b = c + 1
f' : mk (a + 1) ⟶ mk b := f
h₁ : Function.Surjective ⇑(Hom.toOrderHom f')
h₂ : ¬Function.Injective ⇑(Hom.toOrderHom f')
⊢ 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 : 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₂ : Function.Injective ⇑(Hom.toOrderHom f')
⊢ W f

Tactic:
rw [← mono_iff_injective] at 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 : 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

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₁ : Function.Surjective ⇑(Hom.toOrderHom f')
h₂ : Function.Injective ⇑(Hom.toOrderHom f')
⊢ W f

Tactic:
rw [← epi_iff_surjective] at 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 : 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₂ : Function.Injective ⇑(Hom.toOrderHom f')
⊢ W f

Proof state:
case h.mk.mk.h.h.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)
a : ℕ
ha : a ≤ d
b : ℕ
hb : b ≤ d
f : { obj := mk a, property := ha } ⟶ { obj := mk b, property := hb }
h : a + b = 0
⊢ W f

Tactic:
obtain rfl : a = 0 := by omega

Result:
case h.mk.mk.h.h.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)
b : ℕ
hb : b ≤ d
ha : 0 ≤ d
f : { obj := mk 0, property := ha } ⟶ { obj := mk b, property := hb }
h : 0 + b = 0
⊢ W f

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
b : ℕ
hb : b ≤ d
a : ℕ
ha : a + 1 ≤ d
f : { obj := mk (a + 1), property := ha } ⟶ { obj := mk b, property := hb }
h : a + 1 + b = c + 1
f' : mk (a + 1) ⟶ mk b := f
h₁ : Function.Surjective ⇑(Hom.toOrderHom f')
h₂ : ¬Function.Injective ⇑(Hom.toOrderHom f')
i : Fin (a + 1)
g' : mk a ⟶ mk b
hf' : f' = σ i ≫ g'
⊢ W f

Tactic:
obtain rfl : f = (by exact σ i) ≫ (g' : ⟨mk a, by dsimp; omega⟩ ⟶ _) := 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
b : ℕ
hb : b ≤ d
a : ℕ
ha : a + 1 ≤ d
h : a + 1 + b = c + 1
i : Fin (a + 1)
g' : mk a ⟶ mk b
f' : mk (a + 1) ⟶ mk b := σ i ≫ g'
h₁ : Function.Surjective ⇑(Hom.toOrderHom f')
h₂ : ¬Function.Injective ⇑(Hom.toOrderHom f')
hf' : f' = σ i ≫ g'
⊢ W (σ i ≫ g')

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)
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
⊢ b ≤ d

Tactic:
omega

Result:
no goals