ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- IsFreeGroupoid.SpanningTree.functorOfMonoidHom_obj
@[simps]
def functorOfMonoidHom {X} [Monoid X] (f : End (root' T) →* X) :
    G ⥤ CategoryTheory.SingleObj X 
Arguments: {G : Type u} [CategoryTheory.Groupoid G] [IsFreeGroupoid G] (T : WideSubquiver (Quiver.Symmetrify (IsFreeGroupoid.Generators G))) [Quiver.Arborescence (WideSubquiver.toType (Quiver.Symmetrify (IsFreeGroupoid.Generators G)) T)] {X : Type u_1} [Monoid X] (f : CategoryTheory.End (IsFreeGroupoid.SpanningTree.root' T) →* X)
Goal: ∀ (x : G), (IsFreeGroupoid.SpanningTree.functorOfMonoidHom T f).obj x = ()
-- IsFreeGroupoid.SpanningTree.functorOfMonoidHom_map
@[simps]
def functorOfMonoidHom {X} [Monoid X] (f : End (root' T) →* X) :
    G ⥤ CategoryTheory.SingleObj X 
Arguments: {G : Type u} [CategoryTheory.Groupoid G] [IsFreeGroupoid G] (T : WideSubquiver (Quiver.Symmetrify (IsFreeGroupoid.Generators G))) [Quiver.Arborescence (WideSubquiver.toType (Quiver.Symmetrify (IsFreeGroupoid.Generators G)) T)] {X : Type u_1} [Monoid X] (f : CategoryTheory.End (IsFreeGroupoid.SpanningTree.root' T) →* X)
Goal: ∀ {X_1 Y : G} (p : X_1 ⟶ Y),
  (IsFreeGroupoid.SpanningTree.functorOfMonoidHom T f).map p = f (IsFreeGroupoid.SpanningTree.loopOfHom T p)
-- IsFreeGroupoid.SpanningTree.endIsFree
lemma endIsFree : IsFreeGroup (End (root' T)) 
Arguments: {G : Type u} [CategoryTheory.Groupoid G] [IsFreeGroupoid G] (T : WideSubquiver (Quiver.Symmetrify (IsFreeGroupoid.Generators G))) [Quiver.Arborescence (WideSubquiver.toType (Quiver.Symmetrify (IsFreeGroupoid.Generators G)) T)]
Goal: IsFreeGroup (CategoryTheory.End (IsFreeGroupoid.SpanningTree.root' T))
-- IsFreeGroupoid.path_nonempty_of_hom
theorem path_nonempty_of_hom {G} [Groupoid.{u, u} G] [IsFreeGroupoid G] {a b : G} :
    Nonempty (a ⟶ b) → Nonempty (Path (symgen a) (symgen b)) 
Arguments: {G : Type u} [CategoryTheory.Groupoid G] [IsFreeGroupoid G] {a b : G}
Goal: Nonempty (a ⟶ b) → Nonempty (Quiver.Path (IsFreeGroupoid.symgen a) (IsFreeGroupoid.symgen b))
-- map_eq_bind_pure_comp
@[monad_norm]
theorem map_eq_bind_pure_comp (m : Type u → Type v) [Monad m] [LawfulMonad m]
    (f : α → β) (x : m α) : f <$> x = x >>= pure ∘ f 
Arguments: {α β : Type u} (m : Type u → Type v) [Monad m] [LawfulMonad m] (f : α → β) (x : m α)
Goal: f <$> x = x >>= pure ∘ f
-- PLift.map_up
@[simp]
theorem map_up (f : α → β) (a : α) : (PLift.up a).map f = PLift.up (f a) 
Arguments: {α : Sort u} {β : Sort v} (f : α → β) (a : α)
Goal: PLift.map f { down := a } = { down := f a }
-- PLift.seq_up
@[simp]
theorem seq_up (f : α → β) (x : α) : (PLift.up f).seq (fun _ => PLift.up x) = PLift.up (f x) 
Arguments: {α : Sort u} {β : Sort v} (f : α → β) (x : α)
Goal: ({ down := f }.seq fun x_1 => { down := x }) = { down := f x }
-- PLift.bind_up
@[simp]
theorem bind_up (a : α) (f : α → PLift β) : (PLift.up a).bind f = f a 
Arguments: {α : Sort u} {β : Sort v} (a : α) (f : α → PLift β)
Goal: { down := a }.bind f = f a
-- PLift.rec.constant
@[simp]
theorem rec.constant {α : Sort u} {β : Type v} (b : β) :
    (@PLift.rec α (fun _ => β) fun _ => b) = fun _ => b 
Arguments: {α : Sort u} {β : Type v} (b : β)
Goal: (PLift.rec fun x => b) = fun x => b
-- ULift.map_up
@[simp]
theorem map_up (f : α → β) (a : α) : (ULift.up.{u'} a).map f = ULift.up.{v'} (f a) 
Arguments: {α : Type u} {β : Type v} (f : α → β) (a : α)
Goal: ULift.map f { down := a } = { down := f a }
-- ULift.seq_up
@[simp]
theorem seq_up (f : α → β) (x : α) : (ULift.up f).seq (fun _ => ULift.up x) = ULift.up (f x) 
Arguments: {α : Type u} {β : Type v} (f : α → β) (x : α)
Goal: ({ down := f }.seq fun x_1 => { down := x }) = { down := f x }
-- ULift.bind_up
@[simp]
theorem bind_up (a : α) (f : α → ULift β) : (ULift.up a).bind f = f a 
Arguments: {α : Type u} {β : Type v} (a : α) (f : α → ULift β)
Goal: { down := a }.bind f = f a
-- ULift.rec.constant
@[simp]
theorem rec.constant {α : Type u} {β : Sort v} (b : β) :
    (@ULift.rec α (fun _ => β) fun _ => b) = fun _ => b 
Arguments: {α : Type u} {β : Sort v} (b : β)
Goal: (ULift.rec fun x => b) = fun x => b
-- WriterT.ext
@[ext]
protected theorem ext {ω : Type u} (x x' : WriterT ω M α) (h : x.run = x'.run) : x = x' 
Arguments: {M : Type u → Type v} {α ω : Type u} (x x' : WriterT ω M α) (h : x.run = x'.run)
Goal: x = x'
-- Monoid.CoprodI.Word.chain_ne
@[ext]
structure Word where
    toList : List (Σi, M i)
    ne_one : ∀ l ∈ toList, Sigma.snd l ≠ 1
    chain_ne : toList.Chain' fun l l' => Sigma.fst l ≠ Sigma.fst l'
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] (self : Monoid.CoprodI.Word M)
Goal: List.Chain' (fun l l' => l.fst ≠ l'.fst) self.toList
-- Monoid.CoprodI.Word.ne_one
@[ext]
structure Word where
    toList : List (Σi, M i)
    ne_one : ∀ l ∈ toList, Sigma.snd l ≠ 1
    chain_ne : toList.Chain' fun l l' => Sigma.fst l ≠ Sigma.fst l'
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] (self : Monoid.CoprodI.Word M) (l : (i : ι) × M i)
Goal: l ∈ self.toList → l.snd ≠ 1
-- Monoid.CoprodI.of_apply
theorem of_apply {i} (m : M i) : of m = Con.mk' _ (FreeMonoid.of <| Sigma.mk i m) 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] {i : ι} (m : M i)
Goal: Monoid.CoprodI.of m = (conGen (Monoid.CoprodI.Rel M)).mk' (FreeMonoid.of ⟨i, m⟩)
-- Monoid.CoprodI.ext_hom
-- Porting note: higher `ext` priority
@[ext 1100]
theorem ext_hom (f g : CoprodI M →* N) (h : ∀ i, f.comp (of : M i →* _) = g.comp of) : f = g 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] {N : Type u_3} [Monoid N] (f g : Monoid.CoprodI M →* N) (h : ∀ (i : ι), f.comp Monoid.CoprodI.of = g.comp Monoid.CoprodI.of)
Goal: f = g
-- Monoid.CoprodI.lift_symm_apply
@[simps symm_apply]
def lift : (∀ i, M i →* N) ≃ (CoprodI M →* N) 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] {N : Type u_3} [Monoid N] (f : Monoid.CoprodI M →* N) (i : ι)
Goal: Monoid.CoprodI.lift.symm f i = f.comp Monoid.CoprodI.of
-- Monoid.CoprodI.lift_comp_of
@[simp]
theorem lift_comp_of {N} [Monoid N] (fi : ∀ i, M i →* N) i : (lift fi).comp of = fi i 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] {N : Type u_4} [Monoid N] (fi : (i : ι) → M i →* N) (i : ι)
Goal: (Monoid.CoprodI.lift fi).comp Monoid.CoprodI.of = fi i
-- Monoid.CoprodI.lift_of
@[simp]
theorem lift_of {N} [Monoid N] (fi : ∀ i, M i →* N) {i} (m : M i) : lift fi (of m) = fi i m 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] {N : Type u_4} [Monoid N] (fi : (i : ι) → M i →* N) {i : ι} (m : M i)
Goal: (Monoid.CoprodI.lift fi) (Monoid.CoprodI.of m) = (fi i) m
-- Monoid.CoprodI.lift_comp_of'
@[simp]
theorem lift_comp_of' {N} [Monoid N] (f : CoprodI M →* N) :
    lift (fun i ↦ f.comp (of (i := i))) = f 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] {N : Type u_4} [Monoid N] (f : Monoid.CoprodI M →* N)
Goal: (Monoid.CoprodI.lift fun i => f.comp Monoid.CoprodI.of) = f
-- Monoid.CoprodI.lift_of'
@[simp]
theorem lift_of' : lift (fun i ↦ (of : M i →* CoprodI M)) = .id (CoprodI M) 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)]
Goal: (Monoid.CoprodI.lift fun i => Monoid.CoprodI.of) = MonoidHom.id (Monoid.CoprodI M)
-- Monoid.CoprodI.of_leftInverse
theorem of_leftInverse [DecidableEq ι] (i : ι) :
    Function.LeftInverse (lift <| Pi.mulSingle i (MonoidHom.id (M i))) of 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] [DecidableEq ι] (i : ι)
Goal: Function.LeftInverse ⇑(Monoid.CoprodI.lift (Pi.mulSingle i (MonoidHom.id (M i)))) ⇑Monoid.CoprodI.of
-- Monoid.CoprodI.of_injective
theorem of_injective (i : ι) : Function.Injective (of : M i →* _) 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] (i : ι)
Goal: Function.Injective ⇑Monoid.CoprodI.of
-- Monoid.CoprodI.mrange_eq_iSup
theorem mrange_eq_iSup {N} [Monoid N] (f : ∀ i, M i →* N) :
    MonoidHom.mrange (lift f) = ⨆ i, MonoidHom.mrange (f i) 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] {N : Type u_4} [Monoid N] (f : (i : ι) → M i →* N)
Goal: MonoidHom.mrange (Monoid.CoprodI.lift f) = ⨆ i, MonoidHom.mrange (f i)
-- Monoid.CoprodI.lift_mrange_le
theorem lift_mrange_le {N} [Monoid N] (f : ∀ i, M i →* N) {s : Submonoid N} :
    MonoidHom.mrange (lift f) ≤ s ↔ ∀ i, MonoidHom.mrange (f i) ≤ s 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] {N : Type u_4} [Monoid N] (f : (i : ι) → M i →* N) {s : Submonoid N}
Goal: MonoidHom.mrange (Monoid.CoprodI.lift f) ≤ s ↔ ∀ (i : ι), MonoidHom.mrange (f i) ≤ s
-- Monoid.CoprodI.iSup_mrange_of
@[simp]
theorem iSup_mrange_of : ⨆ i, MonoidHom.mrange (of : M i →* CoprodI M) = ⊤ 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)]
Goal: ⨆ i, MonoidHom.mrange Monoid.CoprodI.of = ⊤
-- Monoid.CoprodI.mclosure_iUnion_range_of
@[simp]
theorem mclosure_iUnion_range_of :
    Submonoid.closure (⋃ i, Set.range (of : M i →* CoprodI M)) = ⊤ 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)]
Goal: Submonoid.closure (⋃ i, Set.range ⇑Monoid.CoprodI.of) = ⊤
-- Monoid.CoprodI.induction_left
@[elab_as_elim]
theorem induction_left {C : CoprodI M → Prop} (m : CoprodI M) (one : C 1)
    (mul : ∀ {i} (m : M i) x, C x → C (of m * x)) : C m 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] {C : Monoid.CoprodI M → Prop} (m : Monoid.CoprodI M) (one : C 1) (mul : ∀ {i : ι} (m : M i) (x : Monoid.CoprodI M), C x → C (Monoid.CoprodI.of m * x))
Goal: C m
-- Monoid.CoprodI.induction_on
@[elab_as_elim]
theorem induction_on {C : CoprodI M → Prop} (m : CoprodI M) (h_one : C 1)
    (h_of : ∀ (i) (m : M i), C (of m)) (h_mul : ∀ x y, C x → C y → C (x * y)) : C m 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] {C : Monoid.CoprodI M → Prop} (m : Monoid.CoprodI M) (h_one : C 1) (h_of : ∀ (i : ι) (m : M i), C (Monoid.CoprodI.of m)) (h_mul : ∀ (x y : Monoid.CoprodI M), C x → C y → C (x * y))
Goal: C m
-- Monoid.CoprodI.inv_def
theorem inv_def (x : CoprodI G) :
    x⁻¹ =
      MulOpposite.unop
        (lift (fun i => (of : G i →* _).op.comp (MulEquiv.inv' (G i)).toMonoidHom) x) 
Arguments: {ι : Type u_1} (G : ι → Type u_4) [(i : ι) → Group (G i)] (x : Monoid.CoprodI G)
Goal: x⁻¹ =
  MulOpposite.unop
    ((Monoid.CoprodI.lift fun i => (MonoidHom.op Monoid.CoprodI.of).comp (MulEquiv.inv' (G i)).toMonoidHom) x)
-- Monoid.CoprodI.lift_range_le
theorem lift_range_le {N} [Group N] (f : ∀ i, G i →* N) {s : Subgroup N}
    (h : ∀ i, (f i).range ≤ s) : (lift f).range ≤ s 
Arguments: {ι : Type u_1} (G : ι → Type u_4) [(i : ι) → Group (G i)] {N : Type u_5} [Group N] (f : (i : ι) → G i →* N) {s : Subgroup N} (h : ∀ (i : ι), (f i).range ≤ s)
Goal: (Monoid.CoprodI.lift f).range ≤ s
-- Monoid.CoprodI.range_eq_iSup
theorem range_eq_iSup {N} [Group N] (f : ∀ i, G i →* N) : (lift f).range = ⨆ i, (f i).range 
Arguments: {ι : Type u_1} (G : ι → Type u_4) [(i : ι) → Group (G i)] {N : Type u_5} [Group N] (f : (i : ι) → G i →* N)
Goal: (Monoid.CoprodI.lift f).range = ⨆ i, (f i).range
-- Monoid.CoprodI.Word.empty_toList
@[simps]
def empty : Word M 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)]
Goal: Monoid.CoprodI.Word.empty.toList = []
-- Monoid.CoprodI.Word.prod_empty
@[simp]
theorem prod_empty : prod (empty : Word M) = 1 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)]
Goal: Monoid.CoprodI.Word.empty.prod = 1
-- Monoid.CoprodI.Word.fstIdx_ne_iff
theorem fstIdx_ne_iff {w : Word M} {i} :
    fstIdx w ≠ some i ↔ ∀ l ∈ w.toList.head?, i ≠ Sigma.fst l 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] {w : Monoid.CoprodI.Word M} {i : ι}
Goal: w.fstIdx ≠ some i ↔ ∀ l ∈ w.toList.head?, i ≠ l.fst
-- Monoid.CoprodI.Word.Pair.fstIdx_ne
@[ext]
structure Pair (i : ι) where
    head : M i
    tail : Word M
    fstIdx_ne : fstIdx tail ≠ some i
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] {i : ι} (self : Monoid.CoprodI.Word.Pair M i)
Goal: self.tail.fstIdx ≠ some i
-- Monoid.CoprodI.Word.cons_toList
@[simps]
def cons {i} (m : M i) (w : Word M) (hmw : w.fstIdx ≠ some i) (h1 : m ≠ 1) : Word M 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] {i : ι} (m : M i) (w : Monoid.CoprodI.Word M) (hmw : w.fstIdx ≠ some i) (h1 : m ≠ 1)
Goal: (Monoid.CoprodI.Word.cons m w hmw h1).toList = ⟨i, m⟩ :: w.toList
-- Monoid.CoprodI.Word.prod_rcons
@[simp]
theorem prod_rcons {i} (p : Pair M i) : prod (rcons p) = of p.head * prod p.tail 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] [(i : ι) → DecidableEq (M i)] {i : ι} (p : Monoid.CoprodI.Word.Pair M i)
Goal: (Monoid.CoprodI.Word.rcons p).prod = Monoid.CoprodI.of p.head * p.tail.prod
-- Monoid.CoprodI.Word.rcons_inj
theorem rcons_inj {i} : Function.Injective (rcons : Pair M i → Word M) 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] [(i : ι) → DecidableEq (M i)] {i : ι}
Goal: Function.Injective Monoid.CoprodI.Word.rcons
-- Monoid.CoprodI.Word.mem_rcons_iff
theorem mem_rcons_iff {i j : ι} (p : Pair M i) (m : M j) :
    ⟨_, m⟩ ∈ (rcons p).toList ↔ ⟨_, m⟩ ∈ p.tail.toList ∨
      m ≠ 1 ∧ (∃ h : i = j, m = h ▸ p.head) 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] [(i : ι) → DecidableEq (M i)] {i j : ι} (p : Monoid.CoprodI.Word.Pair M i) (m : M j)
Goal: ⟨j, m⟩ ∈ (Monoid.CoprodI.Word.rcons p).toList ↔ ⟨j, m⟩ ∈ p.tail.toList ∨ m ≠ 1 ∧ ∃ (h : i = j), m = h ▸ p.head
-- Monoid.CoprodI.Word.fstIdx_cons
@[simp]
theorem fstIdx_cons {i} (m : M i) (w : Word M) (hmw : w.fstIdx ≠ some i) (h1 : m ≠ 1) :
    fstIdx (cons m w hmw h1) = some i 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] {i : ι} (m : M i) (w : Monoid.CoprodI.Word M) (hmw : w.fstIdx ≠ some i) (h1 : m ≠ 1)
Goal: (Monoid.CoprodI.Word.cons m w hmw h1).fstIdx = some i
-- Monoid.CoprodI.Word.prod_cons
@[simp]
theorem prod_cons (i) (m : M i) (w : Word M) (h1 : m ≠ 1) (h2 : w.fstIdx ≠ some i) :
    prod (cons m w h2 h1) = of m * prod w 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] (i : ι) (m : M i) (w : Monoid.CoprodI.Word M) (h1 : m ≠ 1) (h2 : w.fstIdx ≠ some i)
Goal: (Monoid.CoprodI.Word.cons m w h2 h1).prod = Monoid.CoprodI.of m * w.prod
-- Monoid.CoprodI.Word.consRecOn_empty
@[simp]
theorem consRecOn_empty {motive : Word M → Sort*} (h_empty : motive empty)
    (h_cons : ∀ (i) (m : M i) (w) h1 h2, motive w → motive (cons m w h1 h2)) :
    consRecOn empty h_empty h_cons = h_empty 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] {motive : Monoid.CoprodI.Word M → Sort u_4} (h_empty : motive Monoid.CoprodI.Word.empty) (h_cons :
  (i : ι) →
    (m : M i) →
      (w : Monoid.CoprodI.Word M) →
        (h1 : w.fstIdx ≠ some i) → (h2 : m ≠ 1) → motive w → motive (Monoid.CoprodI.Word.cons m w h1 h2))
Goal: Monoid.CoprodI.Word.consRecOn Monoid.CoprodI.Word.empty h_empty h_cons = h_empty
-- Monoid.CoprodI.Word.consRecOn_cons
@[simp]
theorem consRecOn_cons {motive : Word M → Sort*} (i) (m : M i) (w : Word M) h1 h2
    (h_empty : motive empty)
    (h_cons : ∀ (i) (m : M i) (w) h1 h2, motive w → motive (cons m w h1 h2)) :
    consRecOn (cons m w h1 h2) h_empty h_cons = h_cons i m w h1 h2
      (consRecOn w h_empty h_cons) 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] {motive : Monoid.CoprodI.Word M → Sort u_4} (i : ι) (m : M i) (w : Monoid.CoprodI.Word M) (h1 : w.fstIdx ≠ some i) (h2 : m ≠ 1) (h_empty : motive Monoid.CoprodI.Word.empty) (h_cons :
  (i : ι) →
    (m : M i) →
      (w : Monoid.CoprodI.Word M) →
        (h1 : w.fstIdx ≠ some i) → (h2 : m ≠ 1) → motive w → motive (Monoid.CoprodI.Word.cons m w h1 h2))
Goal: Monoid.CoprodI.Word.consRecOn (Monoid.CoprodI.Word.cons m w h1 h2) h_empty h_cons =
  h_cons i m w h1 h2 (Monoid.CoprodI.Word.consRecOn w h_empty h_cons)
-- Monoid.CoprodI.Word.equivPair_symm
theorem equivPair_symm (i) (p : Pair M i) : (equivPair i).symm p = rcons p 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] [(i : ι) → DecidableEq (M i)] [DecidableEq ι] (i : ι) (p : Monoid.CoprodI.Word.Pair M i)
Goal: (Monoid.CoprodI.Word.equivPair i).symm p = Monoid.CoprodI.Word.rcons p
-- Monoid.CoprodI.Word.equivPair_eq_of_fstIdx_ne
theorem equivPair_eq_of_fstIdx_ne {i} {w : Word M} (h : fstIdx w ≠ some i) :
    equivPair i w = ⟨1, w, h⟩ 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] [(i : ι) → DecidableEq (M i)] [DecidableEq ι] {i : ι} {w : Monoid.CoprodI.Word M} (h : w.fstIdx ≠ some i)
Goal: (Monoid.CoprodI.Word.equivPair i) w = { head := 1, tail := w, fstIdx_ne := h }
-- Monoid.CoprodI.Word.mem_equivPair_tail_iff
theorem mem_equivPair_tail_iff {i j : ι} {w : Word M} (m : M i) :
    (⟨i, m⟩ ∈ (equivPair j w).tail.toList) ↔ ⟨i, m⟩ ∈ w.toList.tail
      ∨ i ≠ j ∧ ∃ h : w.toList ≠ [], w.toList.head h = ⟨i, m⟩ 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] [(i : ι) → DecidableEq (M i)] [DecidableEq ι] {i j : ι} {w : Monoid.CoprodI.Word M} (m : M i)
Goal: ⟨i, m⟩ ∈ ((Monoid.CoprodI.Word.equivPair j) w).tail.toList ↔
  ⟨i, m⟩ ∈ w.toList.tail ∨ i ≠ j ∧ ∃ (h : w.toList ≠ []), w.toList.head h = ⟨i, m⟩
-- Monoid.CoprodI.Word.mem_of_mem_equivPair_tail
theorem mem_of_mem_equivPair_tail {i j : ι} {w : Word M} (m : M i) :
    (⟨i, m⟩ ∈ (equivPair j w).tail.toList) → ⟨i, m⟩ ∈ w.toList 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] [(i : ι) → DecidableEq (M i)] [DecidableEq ι] {i j : ι} {w : Monoid.CoprodI.Word M} (m : M i)
Goal: ⟨i, m⟩ ∈ ((Monoid.CoprodI.Word.equivPair j) w).tail.toList → ⟨i, m⟩ ∈ w.toList
-- Monoid.CoprodI.Word.equivPair_head
theorem equivPair_head {i : ι} {w : Word M} :
    (equivPair i w).head =
      if h : ∃ (h : w.toList ≠ []), (w.toList.head h).1 = i
      then h.snd ▸ (w.toList.head h.1).2
      else 1 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] [(i : ι) → DecidableEq (M i)] [DecidableEq ι] {i : ι} {w : Monoid.CoprodI.Word M}
Goal: ((Monoid.CoprodI.Word.equivPair i) w).head =
  if h : ∃ (h : w.toList ≠ []), (w.toList.head h).fst = i then ⋯ ▸ (w.toList.head ⋯).snd else 1
-- Monoid.CoprodI.Word.smul_def
theorem smul_def {i} (m : M i) (w : Word M) :
    m • w = rcons { equivPair i w with head := m * (equivPair i w).head } 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] [(i : ι) → DecidableEq (M i)] [DecidableEq ι] {i : ι} (m : M i) (w : Monoid.CoprodI.Word M)
Goal: m • w =
  Monoid.CoprodI.Word.rcons
    (let __src := (Monoid.CoprodI.Word.equivPair i) w;
    { head := m * ((Monoid.CoprodI.Word.equivPair i) w).head, tail := __src.tail, fstIdx_ne := ⋯ })
-- Monoid.CoprodI.Word.of_smul_def
theorem of_smul_def (i) (w : Word M) (m : M i) :
    of m • w = rcons { equivPair i w with head := m * (equivPair i w).head } 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] [(i : ι) → DecidableEq (M i)] [DecidableEq ι] (i : ι) (w : Monoid.CoprodI.Word M) (m : M i)
Goal: Monoid.CoprodI.of m • w =
  Monoid.CoprodI.Word.rcons
    (let __src := (Monoid.CoprodI.Word.equivPair i) w;
    { head := m * ((Monoid.CoprodI.Word.equivPair i) w).head, tail := __src.tail, fstIdx_ne := ⋯ })
-- Monoid.CoprodI.Word.equivPair_smul_same
theorem equivPair_smul_same {i} (m : M i) (w : Word M) :
    equivPair i (of m • w) = ⟨m * (equivPair i w).head, (equivPair i w).tail,
      (equivPair i w).fstIdx_ne⟩ 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] [(i : ι) → DecidableEq (M i)] [DecidableEq ι] {i : ι} (m : M i) (w : Monoid.CoprodI.Word M)
Goal: (Monoid.CoprodI.Word.equivPair i) (Monoid.CoprodI.of m • w) =
  { head := m * ((Monoid.CoprodI.Word.equivPair i) w).head, tail := ((Monoid.CoprodI.Word.equivPair i) w).tail,
    fstIdx_ne := ⋯ }
-- Monoid.CoprodI.Word.equivPair_tail
@[simp]
theorem equivPair_tail {i} (p : Pair M i) :
    equivPair i p.tail = ⟨1, p.tail, p.fstIdx_ne⟩ 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] [(i : ι) → DecidableEq (M i)] [DecidableEq ι] {i : ι} (p : Monoid.CoprodI.Word.Pair M i)
Goal: (Monoid.CoprodI.Word.equivPair i) p.tail = { head := 1, tail := p.tail, fstIdx_ne := ⋯ }
-- Monoid.CoprodI.Word.smul_eq_of_smul
theorem smul_eq_of_smul {i} (m : M i) (w : Word M) :
    m • w = of m • w 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] [(i : ι) → DecidableEq (M i)] [DecidableEq ι] {i : ι} (m : M i) (w : Monoid.CoprodI.Word M)
Goal: m • w = Monoid.CoprodI.of m • w
-- Monoid.CoprodI.Word.mem_smul_iff
theorem mem_smul_iff {i j : ι} {m₁ : M i} {m₂ : M j} {w : Word M} :
    ⟨_, m₁⟩ ∈ (of m₂ • w).toList ↔
      (¬i = j ∧ ⟨i, m₁⟩ ∈ w.toList)
      ∨ (m₁ ≠ 1 ∧ ∃ (hij : i = j),(⟨i, m₁⟩ ∈ w.toList.tail) ∨
        (∃ m', ⟨j, m'⟩ ∈ w.toList.head? ∧ m₁ = hij ▸ (m₂ * m')) ∨
        (w.fstIdx ≠ some j ∧ m₁ = hij ▸ m₂)) 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] [(i : ι) → DecidableEq (M i)] [DecidableEq ι] {i j : ι} {m₁ : M i} {m₂ : M j} {w : Monoid.CoprodI.Word M}
Goal: ⟨i, m₁⟩ ∈ (Monoid.CoprodI.of m₂ • w).toList ↔
  ¬i = j ∧ ⟨i, m₁⟩ ∈ w.toList ∨
    m₁ ≠ 1 ∧
      ∃ (hij : i = j),
        ⟨i, m₁⟩ ∈ w.toList.tail ∨
          (∃ m', ⟨j, m'⟩ ∈ w.toList.head? ∧ m₁ = ⋯ ▸ (m₂ * m')) ∨ w.fstIdx ≠ some j ∧ m₁ = ⋯ ▸ m₂
-- Monoid.CoprodI.Word.mem_smul_iff_of_ne
theorem mem_smul_iff_of_ne {i j : ι} (hij : i ≠ j) {m₁ : M i} {m₂ : M j} {w : Word M} :
    ⟨_, m₁⟩ ∈ (of m₂ • w).toList ↔ ⟨i, m₁⟩ ∈ w.toList 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] [(i : ι) → DecidableEq (M i)] [DecidableEq ι] {i j : ι} (hij : i ≠ j) {m₁ : M i} {m₂ : M j} {w : Monoid.CoprodI.Word M}
Goal: ⟨i, m₁⟩ ∈ (Monoid.CoprodI.of m₂ • w).toList ↔ ⟨i, m₁⟩ ∈ w.toList
-- Monoid.CoprodI.Word.cons_eq_smul
theorem cons_eq_smul {i} {m : M i} {ls h1 h2} :
    cons m ls h1 h2 = of m • ls 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] [(i : ι) → DecidableEq (M i)] [DecidableEq ι] {i : ι} {m : M i} {ls : Monoid.CoprodI.Word M} {h1 : ls.fstIdx ≠ some i} {h2 : m ≠ 1}
Goal: Monoid.CoprodI.Word.cons m ls h1 h2 = Monoid.CoprodI.of m • ls
-- Monoid.CoprodI.Word.rcons_eq_smul
theorem rcons_eq_smul {i} (p : Pair M i) :
    rcons p = of p.head • p.tail 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] [(i : ι) → DecidableEq (M i)] [DecidableEq ι] {i : ι} (p : Monoid.CoprodI.Word.Pair M i)
Goal: Monoid.CoprodI.Word.rcons p = Monoid.CoprodI.of p.head • p.tail
-- Monoid.CoprodI.Word.equivPair_head_smul_equivPair_tail
@[simp]
theorem equivPair_head_smul_equivPair_tail {i : ι} (w : Word M) :
    of (equivPair i w).head • (equivPair i w).tail = w 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] [(i : ι) → DecidableEq (M i)] [DecidableEq ι] {i : ι} (w : Monoid.CoprodI.Word M)
Goal: Monoid.CoprodI.of ((Monoid.CoprodI.Word.equivPair i) w).head • ((Monoid.CoprodI.Word.equivPair i) w).tail = w
-- Monoid.CoprodI.Word.equivPair_tail_eq_inv_smul
theorem equivPair_tail_eq_inv_smul {G : ι → Type*} [∀ i, Group (G i)]
    [∀i, DecidableEq (G i)] {i} (w : Word G) :
    (equivPair i w).tail = (of (equivPair i w).head)⁻¹ • w 
Arguments: {ι : Type u_1} [DecidableEq ι] {G : ι → Type u_4} [(i : ι) → Group (G i)] [(i : ι) → DecidableEq (G i)] {i : ι} (w : Monoid.CoprodI.Word G)
Goal: ((Monoid.CoprodI.Word.equivPair i) w).tail = (Monoid.CoprodI.of ((Monoid.CoprodI.Word.equivPair i) w).head)⁻¹ • w
-- Monoid.CoprodI.Word.smul_induction
theorem smul_induction {C : Word M → Prop} (h_empty : C empty)
    (h_smul : ∀ (i) (m : M i) (w), C w → C (of m • w)) (w : Word M) : C w 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] [(i : ι) → DecidableEq (M i)] [DecidableEq ι] {C : Monoid.CoprodI.Word M → Prop} (h_empty : C Monoid.CoprodI.Word.empty) (h_smul : ∀ (i : ι) (m : M i) (w : Monoid.CoprodI.Word M), C w → C (Monoid.CoprodI.of m • w)) (w : Monoid.CoprodI.Word M)
Goal: C w
-- Monoid.CoprodI.Word.prod_smul
@[simp]
theorem prod_smul (m) : ∀ w : Word M, prod (m • w) = m * prod w 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] [(i : ι) → DecidableEq (M i)] [DecidableEq ι] (m : Monoid.CoprodI M) (w : Monoid.CoprodI.Word M)
Goal: (m • w).prod = m * w.prod
-- Monoid.CoprodI.NeWord.toList_ne_nil
theorem toList_ne_nil {i j} (w : NeWord M i j) : w.toList ≠ List.nil 
Arguments: {ι : Type u_1} {M : ι → Type u_2} [(i : ι) → Monoid (M i)] {i j : ι} (w : Monoid.CoprodI.NeWord M i j)
Goal: w.toList ≠ []