Theorem: FreeProduct.induction_on
File: Mathlib/GroupTheory/FreeProduct.lean

tactic: let S : Submonoid (FreeProduct M) :=
  { carrier := setOf C
    mul_mem' := h_mul _ _
    one_mem' := h_one }
state_before: ι : Type u_1
M : ι → Type u_2
inst✝¹ : (i : ι) → Monoid (M i)
N : Type ?u.167807
inst✝ : Monoid N
C : FreeProduct M → Prop
m : FreeProduct M
h_one : C 1
h_of : ∀ (i : ι) (m : M i), C (↑of m)
h_mul : ∀ (x y : FreeProduct M), C x → C y → C (x * y)
⊢ C m

tactic: have : C _ := Subtype.prop (lift (fun i => of.codRestrict S (h_of i)) m)
state_before: ι : Type u_1
M : ι → Type u_2
inst✝¹ : (i : ι) → Monoid (M i)
N : Type ?u.167807
inst✝ : Monoid N
C : FreeProduct M → Prop
m : FreeProduct M
h_one : C 1
h_of : ∀ (i : ι) (m : M i), C (↑of m)
h_mul : ∀ (x y : FreeProduct M), C x → C y → C (x * y)
S : Submonoid (FreeProduct M) :=
  { toSubsemigroup := { carrier := setOf C, mul_mem' := (_ : ∀ {a b : FreeProduct M}, C a → C b → C (a * b)) },
    one_mem' := h_one }
⊢ C m

tactic: convert this
state_before: ι : Type u_1
M : ι → Type u_2
inst✝¹ : (i : ι) → Monoid (M i)
N : Type ?u.167807
inst✝ : Monoid N
C : FreeProduct M → Prop
m : FreeProduct M
h_one : C 1
h_of : ∀ (i : ι) (m : M i), C (↑of m)
h_mul : ∀ (x y : FreeProduct M), C x → C y → C (x * y)
S : Submonoid (FreeProduct M) :=
  { toSubsemigroup := { carrier := setOf C, mul_mem' := (_ : ∀ {a b : FreeProduct M}, C a → C b → C (a * b)) },
    one_mem' := h_one }
this : C ↑(↑(↑lift fun i => MonoidHom.codRestrict of S (_ : ∀ (m : M i), C (↑of m))) m)
⊢ C m

tactic: change MonoidHom.id _ m = S.subtype.comp _ m
state_before: case h.e'_1
ι : Type u_1
M : ι → Type u_2
inst✝¹ : (i : ι) → Monoid (M i)
N : Type ?u.167807
inst✝ : Monoid N
C : FreeProduct M → Prop
m : FreeProduct M
h_one : C 1
h_of : ∀ (i : ι) (m : M i), C (↑of m)
h_mul : ∀ (x y : FreeProduct M), C x → C y → C (x * y)
S : Submonoid (FreeProduct M) :=
  { toSubsemigroup := { carrier := setOf C, mul_mem' := (_ : ∀ {a b : FreeProduct M}, C a → C b → C (a * b)) },
    one_mem' := h_one }
this : C ↑(↑(↑lift fun i => MonoidHom.codRestrict of S (_ : ∀ (m : M i), C (↑of m))) m)
⊢ m = ↑(↑(↑lift fun i => MonoidHom.codRestrict of S (_ : ∀ (m : M i), C (↑of m))) m)

tactic: congr
state_before: case h.e'_1
ι : Type u_1
M : ι → Type u_2
inst✝¹ : (i : ι) → Monoid (M i)
N : Type ?u.167807
inst✝ : Monoid N
C : FreeProduct M → Prop
m : FreeProduct M
h_one : C 1
h_of : ∀ (i : ι) (m : M i), C (↑of m)
h_mul : ∀ (x y : FreeProduct M), C x → C y → C (x * y)
S : Submonoid (FreeProduct M) :=
  { toSubsemigroup := { carrier := setOf C, mul_mem' := (_ : ∀ {a b : FreeProduct M}, C a → C b → C (a * b)) },
    one_mem' := h_one }
this : C ↑(↑(↑lift fun i => MonoidHom.codRestrict of S (_ : ∀ (m : M i), C (↑of m))) m)
⊢ ↑(MonoidHom.id (FreeProduct M)) m =
    ↑(MonoidHom.comp (Submonoid.subtype S) (↑lift fun i => MonoidHom.codRestrict of S (_ : ∀ (m : M i), C (↑of m)))) m

tactic: ext i
state_before: case h.e'_1.e_a
ι : Type u_1
M : ι → Type u_2
inst✝¹ : (i : ι) → Monoid (M i)
N : Type ?u.167807
inst✝ : Monoid N
C : FreeProduct M → Prop
m : FreeProduct M
h_one : C 1
h_of : ∀ (i : ι) (m : M i), C (↑of m)
h_mul : ∀ (x y : FreeProduct M), C x → C y → C (x * y)
S : Submonoid (FreeProduct M) :=
  { toSubsemigroup := { carrier := setOf C, mul_mem' := (_ : ∀ {a b : FreeProduct M}, C a → C b → C (a * b)) },
    one_mem' := h_one }
this : C ↑(↑(↑lift fun i => MonoidHom.codRestrict of S (_ : ∀ (m : M i), C (↑of m))) m)
⊢ MonoidHom.id (FreeProduct M) =
    MonoidHom.comp (Submonoid.subtype S) (↑lift fun i => MonoidHom.codRestrict of S (_ : ∀ (m : M i), C (↑of m)))

tactic: rfl
state_before: case h.e'_1.e_a.h.h
ι : Type u_1
M : ι → Type u_2
inst✝¹ : (i : ι) → Monoid (M i)
N : Type ?u.167807
inst✝ : Monoid N
C : FreeProduct M → Prop
m : FreeProduct M
h_one : C 1
h_of : ∀ (i : ι) (m : M i), C (↑of m)
h_mul : ∀ (x y : FreeProduct M), C x → C y → C (x * y)
S : Submonoid (FreeProduct M) :=
  { toSubsemigroup := { carrier := setOf C, mul_mem' := (_ : ∀ {a b : FreeProduct M}, C a → C b → C (a * b)) },
    one_mem' := h_one }
this : C ↑(↑(↑lift fun i => MonoidHom.codRestrict of S (_ : ∀ (m : M i), C (↑of m))) m)
i : ι
x✝ : M i
⊢ ↑(MonoidHom.comp (MonoidHom.id (FreeProduct M)) of) x✝ =
    ↑(MonoidHom.comp
          (MonoidHom.comp (Submonoid.subtype S)
            (↑lift fun i => MonoidHom.codRestrict of S (_ : ∀ (m : M i), C (↑of m))))
          of)
      x✝