l3lab/ntp-mathlib huggingface dataset:
theorem multiplicity_factor_dvd_iso_eq_multiplicity_of_mem_normalizedFactors {m p : M} {n : N}
    (hm : m ≠ 0) (hn : n ≠ 0) (hp : p ∈ normalizedFactors m)
    {d : { l : M // l ∣ m } ≃ { l : N // l ∣ n }} (hd : ∀ l l', (d l : N) ∣ d l' ↔ (l : M) ∣ l') :
    multiplicity (d ⟨p, dvd_of_mem_normalizedFactors hp⟩ : N) n = multiplicity p m := by
  apply Eq.symm
  suffices multiplicity (Associates.mk p) (Associates.mk m) = multiplicity (Associates.mk
    ↑(d ⟨associatesEquivOfUniqueUnits (associatesEquivOfUniqueUnits.symm p), by
      simp [dvd_of_mem_normalizedFactors hp]⟩)) (Associates.mk n) by
    simpa only [multiplicity_mk_eq_multiplicity, associatesEquivOfUniqueUnits_symm_apply,
      associatesEquivOfUniqueUnits_apply, out_mk, normalize_eq] using this
  have : Associates.mk (d ⟨associatesEquivOfUniqueUnits (associatesEquivOfUniqueUnits.symm p), by
    simp only [dvd_of_mem_normalizedFactors hp, associatesEquivOfUniqueUnits_symm_apply,
      associatesEquivOfUniqueUnits_apply, out_mk, normalize_eq]⟩ : N) =
    ↑(mkFactorOrderIsoOfFactorDvdEquiv hd ⟨associatesEquivOfUniqueUnits.symm p, by
      rw [associatesEquivOfUniqueUnits_symm_apply]
      exact mk_le_mk_of_dvd (dvd_of_mem_normalizedFactors hp)⟩) :=
    by rw [mkFactorOrderIsoOfFactorDvdEquiv_apply_coe]
  rw [this]
  letI := Classical.decEq (Associates M)
  

Proof state:
case h
M : Type u_1
inst✝⁸ : CancelCommMonoidWithZero M
N : Type u_2
inst✝⁷ : CancelCommMonoidWithZero N
inst✝⁶ : Unique Mˣ
inst✝⁵ : Unique Nˣ
inst✝⁴ : UniqueFactorizationMonoid M
inst✝³ : UniqueFactorizationMonoid N
inst✝² : DecidableEq M
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
m p : M
n : N
hm : m ≠ 0
hn : n ≠ 0
hp : p ∈ normalizedFactors m
d : { l // l ∣ m } ≃ { l // l ∣ n }
hd : ∀ (l l' : { l // l ∣ m }), ↑(d l) ∣ ↑(d l') ↔ ↑l ∣ ↑l'
this✝ :
  Associates.mk
      ↑(d
          { val := associatesEquivOfUniqueUnits ((MulEquiv.symm associatesEquivOfUniqueUnits) p),
            property := (_ : normalize p ∣ m) }) =
    ↑((mkFactorOrderIsoOfFactorDvdEquiv hd)
        { val := (MulEquiv.symm associatesEquivOfUniqueUnits) p,
          property := (_ : (MulEquiv.symm associatesEquivOfUniqueUnits) p ∈ Set.Iic (Associates.mk m)) })
this : DecidableEq (Associates M) := Classical.decEq (Associates M)
⊢ multiplicity (Associates.mk p) (Associates.mk m) =
    multiplicity
      (↑((mkFactorOrderIsoOfFactorDvdEquiv hd)
          { val := (MulEquiv.symm associatesEquivOfUniqueUnits) p,
            property := (_ : (MulEquiv.symm associatesEquivOfUniqueUnits) p ∈ Set.Iic (Associates.mk m)) }))
      (Associates.mk n)

Next tactic:
refine'
    multiplicity_prime_eq_multiplicity_image_by_factor_orderIso (mk_ne_zero.mpr hn) _
      (mkFactorOrderIsoOfFactorDvdEquiv hd)
theorem multiplicity_factor_dvd_iso_eq_multiplicity_of_mem_normalizedFactors {m p : M} {n : N}
    (hm : m ≠ 0) (hn : n ≠ 0) (hp : p ∈ normalizedFactors m)
    {d : { l : M // l ∣ m } ≃ { l : N // l ∣ n }} (hd : ∀ l l', (d l : N) ∣ d l' ↔ (l : M) ∣ l') :
    multiplicity (d ⟨p, dvd_of_mem_normalizedFactors hp⟩ : N) n = multiplicity p m := by
  apply Eq.symm
  suffices multiplicity (Associates.mk p) (Associates.mk m) = multiplicity (Associates.mk
    ↑(d ⟨associatesEquivOfUniqueUnits (associatesEquivOfUniqueUnits.symm p), by
      simp [dvd_of_mem_normalizedFactors hp]⟩)) (Associates.mk n) by
    simpa only [multiplicity_mk_eq_multiplicity, associatesEquivOfUniqueUnits_symm_apply,
      associatesEquivOfUniqueUnits_apply, out_mk, normalize_eq] using this
  have : Associates.mk (d ⟨associatesEquivOfUniqueUnits (associatesEquivOfUniqueUnits.symm p), by
    simp only [dvd_of_mem_normalizedFactors hp, associatesEquivOfUniqueUnits_symm_apply,
      associatesEquivOfUniqueUnits_apply, out_mk, normalize_eq]⟩ : N) =
    ↑(mkFactorOrderIsoOfFactorDvdEquiv hd ⟨associatesEquivOfUniqueUnits.symm p, by
      rw [associatesEquivOfUniqueUnits_symm_apply]
      exact mk_le_mk_of_dvd (dvd_of_mem_normalizedFactors hp)⟩) :=
    by rw [mkFactorOrderIsoOfFactorDvdEquiv_apply_coe]
  rw [this]
  letI := Classical.decEq (Associates M)
  refine'
    multiplicity_prime_eq_multiplicity_image_by_factor_orderIso (mk_ne_zero.mpr hn) _
      (mkFactorOrderIsoOfFactorDvdEquiv hd)
  

Proof state:
case h
M : Type u_1
inst✝⁸ : CancelCommMonoidWithZero M
N : Type u_2
inst✝⁷ : CancelCommMonoidWithZero N
inst✝⁶ : Unique Mˣ
inst✝⁵ : Unique Nˣ
inst✝⁴ : UniqueFactorizationMonoid M
inst✝³ : UniqueFactorizationMonoid N
inst✝² : DecidableEq M
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
m p : M
n : N
hm : m ≠ 0
hn : n ≠ 0
hp : p ∈ normalizedFactors m
d : { l // l ∣ m } ≃ { l // l ∣ n }
hd : ∀ (l l' : { l // l ∣ m }), ↑(d l) ∣ ↑(d l') ↔ ↑l ∣ ↑l'
this✝ :
  Associates.mk
      ↑(d
          { val := associatesEquivOfUniqueUnits ((MulEquiv.symm associatesEquivOfUniqueUnits) p),
            property := (_ : normalize p ∣ m) }) =
    ↑((mkFactorOrderIsoOfFactorDvdEquiv hd)
        { val := (MulEquiv.symm associatesEquivOfUniqueUnits) p,
          property := (_ : (MulEquiv.symm associatesEquivOfUniqueUnits) p ∈ Set.Iic (Associates.mk m)) })
this : DecidableEq (Associates M) := Classical.decEq (Associates M)
⊢ Associates.mk p ∈ normalizedFactors (Associates.mk m)

Next tactic:
obtain ⟨q, hq, hq'⟩ :=
    exists_mem_normalizedFactors_of_dvd (mk_ne_zero.mpr hm)
      ((prime_mk p).mpr (prime_of_normalized_factor p hp)).irreducible
      (mk_le_mk_of_dvd (dvd_of_mem_normalizedFactors hp))
theorem multiplicity_factor_dvd_iso_eq_multiplicity_of_mem_normalizedFactors {m p : M} {n : N}
    (hm : m ≠ 0) (hn : n ≠ 0) (hp : p ∈ normalizedFactors m)
    {d : { l : M // l ∣ m } ≃ { l : N // l ∣ n }} (hd : ∀ l l', (d l : N) ∣ d l' ↔ (l : M) ∣ l') :
    multiplicity (d ⟨p, dvd_of_mem_normalizedFactors hp⟩ : N) n = multiplicity p m := by
  apply Eq.symm
  suffices multiplicity (Associates.mk p) (Associates.mk m) = multiplicity (Associates.mk
    ↑(d ⟨associatesEquivOfUniqueUnits (associatesEquivOfUniqueUnits.symm p), by
      simp [dvd_of_mem_normalizedFactors hp]⟩)) (Associates.mk n) by
    simpa only [multiplicity_mk_eq_multiplicity, associatesEquivOfUniqueUnits_symm_apply,
      associatesEquivOfUniqueUnits_apply, out_mk, normalize_eq] using this
  have : Associates.mk (d ⟨associatesEquivOfUniqueUnits (associatesEquivOfUniqueUnits.symm p), by
    simp only [dvd_of_mem_normalizedFactors hp, associatesEquivOfUniqueUnits_symm_apply,
      associatesEquivOfUniqueUnits_apply, out_mk, normalize_eq]⟩ : N) =
    ↑(mkFactorOrderIsoOfFactorDvdEquiv hd ⟨associatesEquivOfUniqueUnits.symm p, by
      rw [associatesEquivOfUniqueUnits_symm_apply]
      exact mk_le_mk_of_dvd (dvd_of_mem_normalizedFactors hp)⟩) :=
    by rw [mkFactorOrderIsoOfFactorDvdEquiv_apply_coe]
  rw [this]
  letI := Classical.decEq (Associates M)
  refine'
    multiplicity_prime_eq_multiplicity_image_by_factor_orderIso (mk_ne_zero.mpr hn) _
      (mkFactorOrderIsoOfFactorDvdEquiv hd)
  obtain ⟨q, hq, hq'⟩ :=
    exists_mem_normalizedFactors_of_dvd (mk_ne_zero.mpr hm)
      ((prime_mk p).mpr (prime_of_normalized_factor p hp)).irreducible
      (mk_le_mk_of_dvd (dvd_of_mem_normalizedFactors hp))
  

Proof state:
case h.intro.intro
M : Type u_1
inst✝⁸ : CancelCommMonoidWithZero M
N : Type u_2
inst✝⁷ : CancelCommMonoidWithZero N
inst✝⁶ : Unique Mˣ
inst✝⁵ : Unique Nˣ
inst✝⁴ : UniqueFactorizationMonoid M
inst✝³ : UniqueFactorizationMonoid N
inst✝² : DecidableEq M
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
m p : M
n : N
hm : m ≠ 0
hn : n ≠ 0
hp : p ∈ normalizedFactors m
d : { l // l ∣ m } ≃ { l // l ∣ n }
hd : ∀ (l l' : { l // l ∣ m }), ↑(d l) ∣ ↑(d l') ↔ ↑l ∣ ↑l'
this✝ :
  Associates.mk
      ↑(d
          { val := associatesEquivOfUniqueUnits ((MulEquiv.symm associatesEquivOfUniqueUnits) p),
            property := (_ : normalize p ∣ m) }) =
    ↑((mkFactorOrderIsoOfFactorDvdEquiv hd)
        { val := (MulEquiv.symm associatesEquivOfUniqueUnits) p,
          property := (_ : (MulEquiv.symm associatesEquivOfUniqueUnits) p ∈ Set.Iic (Associates.mk m)) })
this : DecidableEq (Associates M) := Classical.decEq (Associates M)
q : Associates M
hq : q ∈ normalizedFactors (Associates.mk m)
hq' : Associated (Associates.mk p) q
⊢ Associates.mk p ∈ normalizedFactors (Associates.mk m)

Next tactic:
rwa [associated_iff_eq.mp hq']
instance (priority := 100) SupHomClass.toOrderHomClass [SemilatticeSup α] [SemilatticeSup β]
    [SupHomClass F α β] : OrderHomClass F α β :=
  { ‹SupHomClass F α β› with
    map_rel := fun f a b h => by 

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝² : SemilatticeSup α
inst✝¹ : SemilatticeSup β
inst✝ : SupHomClass F α β
src✝ : SupHomClass F α β := inst✝
f : F
a b : α
h : a ≤ b
⊢ f a ≤ f b

Next tactic:
rw [← sup_eq_right, ← map_sup, sup_eq_right.2 h]
instance (priority := 100) InfHomClass.toOrderHomClass [SemilatticeInf α] [SemilatticeInf β]
    [InfHomClass F α β] : OrderHomClass F α β :=
  { ‹InfHomClass F α β› with
    map_rel := fun f a b h => by 

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝² : SemilatticeInf α
inst✝¹ : SemilatticeInf β
inst✝ : InfHomClass F α β
src✝ : InfHomClass F α β := inst✝
f : F
a b : α
h : a ≤ b
⊢ f a ≤ f b

Next tactic:
rw [← inf_eq_left, ← map_inf, inf_eq_left.2 h]
instance (priority := 100) OrderIsoClass.toSupHomClass [SemilatticeSup α] [SemilatticeSup β]
    [OrderIsoClass F α β] : SupHomClass F α β :=
  { show OrderHomClass F α β from inferInstance with
    map_sup := fun f a b =>
      eq_of_forall_ge_iff fun c => by 

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝² : SemilatticeSup α
inst✝¹ : SemilatticeSup β
inst✝ : OrderIsoClass F α β
src✝ : OrderHomClass F α β :=
  let_fun this := inferInstance;
  this
f : F
a b : α
c : β
⊢ f (a ⊔ b) ≤ c ↔ f a ⊔ f b ≤ c

Next tactic:
simp only [← le_map_inv_iff, sup_le_iff]
instance (priority := 100) OrderIsoClass.toInfHomClass [SemilatticeInf α] [SemilatticeInf β]
    [OrderIsoClass F α β] : InfHomClass F α β :=
  { show OrderHomClass F α β from inferInstance with
    map_inf := fun f a b =>
      eq_of_forall_le_iff fun c => by 

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝² : SemilatticeInf α
inst✝¹ : SemilatticeInf β
inst✝ : OrderIsoClass F α β
src✝ : OrderHomClass F α β :=
  let_fun this := inferInstance;
  this
f : F
a b : α
c : β
⊢ c ≤ f (a ⊓ b) ↔ c ≤ f a ⊓ f b

Next tactic:
simp only [← map_inv_le_iff, le_inf_iff]
theorem Disjoint.map (h : Disjoint a b) : Disjoint (f a) (f b) := by
  

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝⁴ : Lattice α
inst✝³ : BoundedOrder α
inst✝² : Lattice β
inst✝¹ : BoundedOrder β
inst✝ : BoundedLatticeHomClass F α β
f : F
a b : α
h : Disjoint a b
⊢ Disjoint (f a) (f b)

Next tactic:
rw [disjoint_iff, ← map_inf, h.eq_bot, map_bot]
theorem Codisjoint.map (h : Codisjoint a b) : Codisjoint (f a) (f b) := by
  

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝⁴ : Lattice α
inst✝³ : BoundedOrder α
inst✝² : Lattice β
inst✝¹ : BoundedOrder β
inst✝ : BoundedLatticeHomClass F α β
f : F
a b : α
h : Codisjoint a b
⊢ Codisjoint (f a) (f b)

Next tactic:
rw [codisjoint_iff, ← map_sup, h.eq_top, map_top]
/-- Special case of `map_sdiff` for boolean algebras. -/
theorem map_sdiff' (a b : α) : f (a \ b) = f a \ f b := by
  

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝² : BooleanAlgebra α
inst✝¹ : BooleanAlgebra β
inst✝ : BoundedLatticeHomClass F α β
f : F
a b : α
⊢ f (a \ b) = f a \ f b

Next tactic:
rw [sdiff_eq, sdiff_eq, map_inf, map_compl']
/-- Special case of `map_symmDiff` for boolean algebras. -/
theorem map_symmDiff' (a b : α) : f (a ∆ b) = f a ∆ f b := by
  

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝² : BooleanAlgebra α
inst✝¹ : BooleanAlgebra β
inst✝ : BoundedLatticeHomClass F α β
f : F
a b : α
⊢ f (a ∆ b) = f a ∆ f b

Next tactic:
rw [symmDiff, symmDiff, map_sup, map_sdiff', map_sdiff']
instance : SupHomClass (SupHom α β) α β where
  coe := SupHom.toFun
  coe_injective' f g h := by 

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝³ : Sup α
inst✝² : Sup β
inst✝¹ : Sup γ
inst✝ : Sup δ
f g : SupHom α β
h : f.toFun = g.toFun
⊢ f = g

Next tactic:
cases f
instance : SupHomClass (SupHom α β) α β where
  coe := SupHom.toFun
  coe_injective' f g h := by cases f; 

Proof state:
case mk
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝³ : Sup α
inst✝² : Sup β
inst✝¹ : Sup γ
inst✝ : Sup δ
g : SupHom α β
toFun✝ : α → β
map_sup'✝ : ∀ (a b : α), toFun✝ (a ⊔ b) = toFun✝ a ⊔ toFun✝ b
h : { toFun := toFun✝, map_sup' := map_sup'✝ }.toFun = g.toFun
⊢ { toFun := toFun✝, map_sup' := map_sup'✝ } = g

Next tactic:
cases g
instance : SupHomClass (SupHom α β) α β where
  coe := SupHom.toFun
  coe_injective' f g h := by cases f; cases g; 

Proof state:
case mk.mk
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝³ : Sup α
inst✝² : Sup β
inst✝¹ : Sup γ
inst✝ : Sup δ
toFun✝¹ : α → β
map_sup'✝¹ : ∀ (a b : α), toFun✝¹ (a ⊔ b) = toFun✝¹ a ⊔ toFun✝¹ b
toFun✝ : α → β
map_sup'✝ : ∀ (a b : α), toFun✝ (a ⊔ b) = toFun✝ a ⊔ toFun✝ b
h : { toFun := toFun✝¹, map_sup' := map_sup'✝¹ }.toFun = { toFun := toFun✝, map_sup' := map_sup'✝ }.toFun
⊢ { toFun := toFun✝¹, map_sup' := map_sup'✝¹ } = { toFun := toFun✝, map_sup' := map_sup'✝ }

Next tactic:
congr
/-- Composition of `SupHom`s as a `SupHom`. -/
def comp (f : SupHom β γ) (g : SupHom α β) : SupHom α γ where
  toFun := f ∘ g
  map_sup' a b := by 

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝³ : Sup α
inst✝² : Sup β
inst✝¹ : Sup γ
inst✝ : Sup δ
f : SupHom β γ
g : SupHom α β
a b : α
⊢ (⇑f ∘ ⇑g) (a ⊔ b) = (⇑f ∘ ⇑g) a ⊔ (⇑f ∘ ⇑g) b

Next tactic:
rw [comp_apply, map_sup, map_sup]
/-- Composition of `SupHom`s as a `SupHom`. -/
def comp (f : SupHom β γ) (g : SupHom α β) : SupHom α γ where
  toFun := f ∘ g
  map_sup' a b := by rw [comp_apply, map_sup, map_sup]; 

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝³ : Sup α
inst✝² : Sup β
inst✝¹ : Sup γ
inst✝ : Sup δ
f : SupHom β γ
g : SupHom α β
a b : α
⊢ f (g a) ⊔ f (g b) = (⇑f ∘ ⇑g) a ⊔ (⇑f ∘ ⇑g) b

Next tactic:
rfl
@[simp]
theorem cancel_left {g : SupHom β γ} {f₁ f₂ : SupHom α β} (hg : Injective g) :
    g.comp f₁ = g.comp f₂ ↔ f₁ = f₂ :=
  ⟨fun h => SupHom.ext fun a => hg <| by 

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝³ : Sup α
inst✝² : Sup β
inst✝¹ : Sup γ
inst✝ : Sup δ
g : SupHom β γ
f₁ f₂ : SupHom α β
hg : Injective ⇑g
h : comp g f₁ = comp g f₂
a : α
⊢ g (f₁ a) = g (f₂ a)

Next tactic:
rw [← SupHom.comp_apply, h, SupHom.comp_apply]
instance : Sup (SupHom α β) :=
  ⟨fun f g =>
    ⟨f ⊔ g, fun a b => by
      

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝¹ : Sup α
inst✝ : SemilatticeSup β
f g : SupHom α β
a b : α
⊢ (⇑f ⊔ ⇑g) (a ⊔ b) = (⇑f ⊔ ⇑g) a ⊔ (⇑f ⊔ ⇑g) b

Next tactic:
rw [Pi.sup_apply, map_sup, map_sup]
instance : Sup (SupHom α β) :=
  ⟨fun f g =>
    ⟨f ⊔ g, fun a b => by
      rw [Pi.sup_apply, map_sup, map_sup]
      

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝¹ : Sup α
inst✝ : SemilatticeSup β
f g : SupHom α β
a b : α
⊢ f a ⊔ f b ⊔ (g a ⊔ g b) = (⇑f ⊔ ⇑g) a ⊔ (⇑f ⊔ ⇑g) b

Next tactic:
exact sup_sup_sup_comm _ _ _ _
instance : InfHomClass (InfHom α β) α β where
  coe := InfHom.toFun
  coe_injective' f g h := by 

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝³ : Inf α
inst✝² : Inf β
inst✝¹ : Inf γ
inst✝ : Inf δ
f g : InfHom α β
h : f.toFun = g.toFun
⊢ f = g

Next tactic:
cases f
instance : InfHomClass (InfHom α β) α β where
  coe := InfHom.toFun
  coe_injective' f g h := by cases f; 

Proof state:
case mk
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝³ : Inf α
inst✝² : Inf β
inst✝¹ : Inf γ
inst✝ : Inf δ
g : InfHom α β
toFun✝ : α → β
map_inf'✝ : ∀ (a b : α), toFun✝ (a ⊓ b) = toFun✝ a ⊓ toFun✝ b
h : { toFun := toFun✝, map_inf' := map_inf'✝ }.toFun = g.toFun
⊢ { toFun := toFun✝, map_inf' := map_inf'✝ } = g

Next tactic:
cases g
instance : InfHomClass (InfHom α β) α β where
  coe := InfHom.toFun
  coe_injective' f g h := by cases f; cases g; 

Proof state:
case mk.mk
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝³ : Inf α
inst✝² : Inf β
inst✝¹ : Inf γ
inst✝ : Inf δ
toFun✝¹ : α → β
map_inf'✝¹ : ∀ (a b : α), toFun✝¹ (a ⊓ b) = toFun✝¹ a ⊓ toFun✝¹ b
toFun✝ : α → β
map_inf'✝ : ∀ (a b : α), toFun✝ (a ⊓ b) = toFun✝ a ⊓ toFun✝ b
h : { toFun := toFun✝¹, map_inf' := map_inf'✝¹ }.toFun = { toFun := toFun✝, map_inf' := map_inf'✝ }.toFun
⊢ { toFun := toFun✝¹, map_inf' := map_inf'✝¹ } = { toFun := toFun✝, map_inf' := map_inf'✝ }

Next tactic:
congr
/-- Composition of `InfHom`s as an `InfHom`. -/
def comp (f : InfHom β γ) (g : InfHom α β) : InfHom α γ where
  toFun := f ∘ g
  map_inf' a b := by 

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝³ : Inf α
inst✝² : Inf β
inst✝¹ : Inf γ
inst✝ : Inf δ
f : InfHom β γ
g : InfHom α β
a b : α
⊢ (⇑f ∘ ⇑g) (a ⊓ b) = (⇑f ∘ ⇑g) a ⊓ (⇑f ∘ ⇑g) b

Next tactic:
rw [comp_apply, map_inf, map_inf]
/-- Composition of `InfHom`s as an `InfHom`. -/
def comp (f : InfHom β γ) (g : InfHom α β) : InfHom α γ where
  toFun := f ∘ g
  map_inf' a b := by rw [comp_apply, map_inf, map_inf]; 

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝³ : Inf α
inst✝² : Inf β
inst✝¹ : Inf γ
inst✝ : Inf δ
f : InfHom β γ
g : InfHom α β
a b : α
⊢ f (g a) ⊓ f (g b) = (⇑f ∘ ⇑g) a ⊓ (⇑f ∘ ⇑g) b

Next tactic:
rfl
@[simp]
theorem cancel_left {g : InfHom β γ} {f₁ f₂ : InfHom α β} (hg : Injective g) :
    g.comp f₁ = g.comp f₂ ↔ f₁ = f₂ :=
  ⟨fun h => InfHom.ext fun a => hg <| by 

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝³ : Inf α
inst✝² : Inf β
inst✝¹ : Inf γ
inst✝ : Inf δ
g : InfHom β γ
f₁ f₂ : InfHom α β
hg : Injective ⇑g
h : comp g f₁ = comp g f₂
a : α
⊢ g (f₁ a) = g (f₂ a)

Next tactic:
rw [← InfHom.comp_apply, h, InfHom.comp_apply]
instance : Inf (InfHom α β) :=
  ⟨fun f g =>
    ⟨f ⊓ g, fun a b => by
      

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝¹ : Inf α
inst✝ : SemilatticeInf β
f g : InfHom α β
a b : α
⊢ (⇑f ⊓ ⇑g) (a ⊓ b) = (⇑f ⊓ ⇑g) a ⊓ (⇑f ⊓ ⇑g) b

Next tactic:
rw [Pi.inf_apply, map_inf, map_inf]
instance : Inf (InfHom α β) :=
  ⟨fun f g =>
    ⟨f ⊓ g, fun a b => by
      rw [Pi.inf_apply, map_inf, map_inf]
      

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝¹ : Inf α
inst✝ : SemilatticeInf β
f g : InfHom α β
a b : α
⊢ f a ⊓ f b ⊓ (g a ⊓ g b) = (⇑f ⊓ ⇑g) a ⊓ (⇑f ⊓ ⇑g) b

Next tactic:
exact inf_inf_inf_comm _ _ _ _
instance : SupBotHomClass (SupBotHom α β) α β
    where
  coe f := f.toFun
  coe_injective' f g h := by
    

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝⁷ : Sup α
inst✝⁶ : Bot α
inst✝⁵ : Sup β
inst✝⁴ : Bot β
inst✝³ : Sup γ
inst✝² : Bot γ
inst✝¹ : Sup δ
inst✝ : Bot δ
f g : SupBotHom α β
h : (fun f => f.toFun) f = (fun f => f.toFun) g
⊢ f = g

Next tactic:
obtain ⟨⟨_, _⟩, _⟩ := f
instance : SupBotHomClass (SupBotHom α β) α β
    where
  coe f := f.toFun
  coe_injective' f g h := by
    obtain ⟨⟨_, _⟩, _⟩ := f
    

Proof state:
case mk.mk
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝⁷ : Sup α
inst✝⁶ : Bot α
inst✝⁵ : Sup β
inst✝⁴ : Bot β
inst✝³ : Sup γ
inst✝² : Bot γ
inst✝¹ : Sup δ
inst✝ : Bot δ
g : SupBotHom α β
toFun✝ : α → β
map_sup'✝ : ∀ (a b : α), toFun✝ (a ⊔ b) = toFun✝ a ⊔ toFun✝ b
map_bot'✝ : SupHom.toFun { toFun := toFun✝, map_sup' := map_sup'✝ } ⊥ = ⊥
h :
  (fun f => f.toFun) { toSupHom := { toFun := toFun✝, map_sup' := map_sup'✝ }, map_bot' := map_bot'✝ } =
    (fun f => f.toFun) g
⊢ { toSupHom := { toFun := toFun✝, map_sup' := map_sup'✝ }, map_bot' := map_bot'✝ } = g

Next tactic:
obtain ⟨⟨_, _⟩, _⟩ := g
instance : SupBotHomClass (SupBotHom α β) α β
    where
  coe f := f.toFun
  coe_injective' f g h := by
    obtain ⟨⟨_, _⟩, _⟩ := f
    obtain ⟨⟨_, _⟩, _⟩ := g
    

Proof state:
case mk.mk.mk.mk
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝⁷ : Sup α
inst✝⁶ : Bot α
inst✝⁵ : Sup β
inst✝⁴ : Bot β
inst✝³ : Sup γ
inst✝² : Bot γ
inst✝¹ : Sup δ
inst✝ : Bot δ
toFun✝¹ : α → β
map_sup'✝¹ : ∀ (a b : α), toFun✝¹ (a ⊔ b) = toFun✝¹ a ⊔ toFun✝¹ b
map_bot'✝¹ : SupHom.toFun { toFun := toFun✝¹, map_sup' := map_sup'✝¹ } ⊥ = ⊥
toFun✝ : α → β
map_sup'✝ : ∀ (a b : α), toFun✝ (a ⊔ b) = toFun✝ a ⊔ toFun✝ b
map_bot'✝ : SupHom.toFun { toFun := toFun✝, map_sup' := map_sup'✝ } ⊥ = ⊥
h :
  (fun f => f.toFun) { toSupHom := { toFun := toFun✝¹, map_sup' := map_sup'✝¹ }, map_bot' := map_bot'✝¹ } =
    (fun f => f.toFun) { toSupHom := { toFun := toFun✝, map_sup' := map_sup'✝ }, map_bot' := map_bot'✝ }
⊢ { toSupHom := { toFun := toFun✝¹, map_sup' := map_sup'✝¹ }, map_bot' := map_bot'✝¹ } =
    { toSupHom := { toFun := toFun✝, map_sup' := map_sup'✝ }, map_bot' := map_bot'✝ }

Next tactic:
congr
@[simp]
theorem cancel_left {g : SupBotHom β γ} {f₁ f₂ : SupBotHom α β} (hg : Injective g) :
    g.comp f₁ = g.comp f₂ ↔ f₁ = f₂ :=
  ⟨fun h => SupBotHom.ext fun a => hg <| by 

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝⁷ : Sup α
inst✝⁶ : Bot α
inst✝⁵ : Sup β
inst✝⁴ : Bot β
inst✝³ : Sup γ
inst✝² : Bot γ
inst✝¹ : Sup δ
inst✝ : Bot δ
g : SupBotHom β γ
f₁ f₂ : SupBotHom α β
hg : Injective ⇑g
h : comp g f₁ = comp g f₂
a : α
⊢ g (f₁ a) = g (f₂ a)

Next tactic:
rw [← comp_apply, h, comp_apply]
instance : InfTopHomClass (InfTopHom α β) α β
    where
  coe f := f.toFun
  coe_injective' f g h := by
    

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝⁷ : Inf α
inst✝⁶ : Top α
inst✝⁵ : Inf β
inst✝⁴ : Top β
inst✝³ : Inf γ
inst✝² : Top γ
inst✝¹ : Inf δ
inst✝ : Top δ
f g : InfTopHom α β
h : (fun f => f.toFun) f = (fun f => f.toFun) g
⊢ f = g

Next tactic:
obtain ⟨⟨_, _⟩, _⟩ := f
instance : InfTopHomClass (InfTopHom α β) α β
    where
  coe f := f.toFun
  coe_injective' f g h := by
    obtain ⟨⟨_, _⟩, _⟩ := f
    

Proof state:
case mk.mk
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
inst✝⁷ : Inf α
inst✝⁶ : Top α
inst✝⁵ : Inf β
inst✝⁴ : Top β
inst✝³ : Inf γ
inst✝² : Top γ
inst✝¹ : Inf δ
inst✝ : Top δ
g : InfTopHom α β
toFun✝ : α → β
map_inf'✝ : ∀ (a b : α), toFun✝ (a ⊓ b) = toFun✝ a ⊓ toFun✝ b
map_top'✝ : InfHom.toFun { toFun := toFun✝, map_inf' := map_inf'✝ } ⊤ = ⊤
h :
  (fun f => f.toFun) { toInfHom := { toFun := toFun✝, map_inf' := map_inf'✝ }, map_top' := map_top'✝ } =
    (fun f => f.toFun) g
⊢ { toInfHom := { toFun := toFun✝, map_inf' := map_inf'✝ }, map_top' := map_top'✝ } = g

Next tactic:
obtain ⟨⟨_, _⟩, _⟩ := g