tasksource/leandojo huggingface dataset:
Theorem: algebraicIndependent_sUnion_of_directed
File: Mathlib/RingTheory/AlgebraicIndependent.lean

tactic: letI : Nonempty s := Nonempty.to_subtype hsn
state_before: ι : Type ?u.873393
ι' : Type ?u.873396
R : Type u_2
K : Type ?u.873402
A : Type u_1
A' : Type ?u.873408
A'' : Type ?u.873411
V : Type u
V' : Type ?u.873416
x : ι → A
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : CommRing A'
inst✝³ : CommRing A''
inst✝² : Algebra R A
inst✝¹ : Algebra R A'
inst✝ : Algebra R A''
a b : R
s : Set (Set A)
hsn : Set.Nonempty s
hs : DirectedOn (fun x x_1 => x ⊆ x_1) s
h : ∀ (a : Set A), a ∈ s → AlgebraicIndependent R Subtype.val
⊢ AlgebraicIndependent R Subtype.val

tactic: rw [sUnion_eq_iUnion]
state_before: ι : Type ?u.873393
ι' : Type ?u.873396
R : Type u_2
K : Type ?u.873402
A : Type u_1
A' : Type ?u.873408
A'' : Type ?u.873411
V : Type u
V' : Type ?u.873416
x : ι → A
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : CommRing A'
inst✝³ : CommRing A''
inst✝² : Algebra R A
inst✝¹ : Algebra R A'
inst✝ : Algebra R A''
a b : R
s : Set (Set A)
hsn : Set.Nonempty s
hs : DirectedOn (fun x x_1 => x ⊆ x_1) s
h : ∀ (a : Set A), a ∈ s → AlgebraicIndependent R Subtype.val
this : Nonempty ↑s := Nonempty.to_subtype hsn
⊢ AlgebraicIndependent R Subtype.val

tactic: exact algebraicIndependent_iUnion_of_directed hs.directed_val (by simpa using h)
state_before: ι : Type ?u.873393
ι' : Type ?u.873396
R : Type u_2
K : Type ?u.873402
A : Type u_1
A' : Type ?u.873408
A'' : Type ?u.873411
V : Type u
V' : Type ?u.873416
x : ι → A
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : CommRing A'
inst✝³ : CommRing A''
inst✝² : Algebra R A
inst✝¹ : Algebra R A'
inst✝ : Algebra R A''
a b : R
s : Set (Set A)
hsn : Set.Nonempty s
hs : DirectedOn (fun x x_1 => x ⊆ x_1) s
h : ∀ (a : Set A), a ∈ s → AlgebraicIndependent R Subtype.val
this : Nonempty ↑s := Nonempty.to_subtype hsn
⊢ AlgebraicIndependent R Subtype.val

tactic: simpa using h
state_before: ι : Type ?u.873393
ι' : Type ?u.873396
R : Type u_2
K : Type ?u.873402
A : Type u_1
A' : Type ?u.873408
A'' : Type ?u.873411
V : Type u
V' : Type ?u.873416
x : ι → A
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : CommRing A'
inst✝³ : CommRing A''
inst✝² : Algebra R A
inst✝¹ : Algebra R A'
inst✝ : Algebra R A''
a b : R
s : Set (Set A)
hsn : Set.Nonempty s
hs : DirectedOn (fun x x_1 => x ⊆ x_1) s
h : ∀ (a : Set A), a ∈ s → AlgebraicIndependent R Subtype.val
this : Nonempty ↑s := Nonempty.to_subtype hsn
⊢ ∀ (i : ↑s), AlgebraicIndependent R Subtype.val
Theorem: List.destutter'_is_chain'
File: Mathlib/Data/List/Destutter.lean

tactic: induction' l with b l hl generalizing a
state_before: α : Type u_1
l : List α
R : α → α → Prop
inst✝ : DecidableRel R
a✝ b a : α
⊢ Chain' R (destutter' R a l)

tactic: rw [destutter']
state_before: case cons
α : Type u_1
l✝ : List α
R : α → α → Prop
inst✝ : DecidableRel R
a✝¹ b✝ a✝ b : α
l : List α
hl : ∀ (a : α), Chain' R (destutter' R a l)
a : α
⊢ Chain' R (destutter' R a (b :: l))

tactic: split_ifs with h
state_before: case cons
α : Type u_1
l✝ : List α
R : α → α → Prop
inst✝ : DecidableRel R
a✝¹ b✝ a✝ b : α
l : List α
hl : ∀ (a : α), Chain' R (destutter' R a l)
a : α
⊢ Chain' R (if R a b then a :: destutter' R b l else destutter' R a l)

tactic: simp
state_before: case nil
α : Type u_1
l : List α
R : α → α → Prop
inst✝ : DecidableRel R
a✝¹ b a✝ a : α
⊢ Chain' R (destutter' R a [])

tactic: exact destutter'_is_chain R l h
state_before: case cons.inl
α : Type u_1
l✝ : List α
R : α → α → Prop
inst✝ : DecidableRel R
a✝¹ b✝ a✝ b : α
l : List α
hl : ∀ (a : α), Chain' R (destutter' R a l)
a : α
h : R a b
⊢ Chain' R (a :: destutter' R b l)

tactic: exact hl a
state_before: case cons.inr
α : Type u_1
l✝ : List α
R : α → α → Prop
inst✝ : DecidableRel R
a✝¹ b✝ a✝ b : α
l : List α
hl : ∀ (a : α), Chain' R (destutter' R a l)
a : α
h : ¬R a b
⊢ Chain' R (destutter' R a l)
Theorem: Dfinsupp.card_Iio
File: Mathlib/Data/Dfinsupp/Interval.lean

tactic: rw [card_Iio_eq_card_Iic_sub_one, card_Iic]
state_before: ι : Type u_1
α : ι → Type u_2
inst✝³ : DecidableEq ι
inst✝² : (i : ι) → DecidableEq (α i)
inst✝¹ : (i : ι) → CanonicallyOrderedAddMonoid (α i)
inst✝ : (i : ι) → LocallyFiniteOrder (α i)
f : Π₀ (i : ι), α i
⊢ card (Iio f) = ∏ i in support f, card (Iic (↑f i)) - 1
Theorem: Finset.filter_mem_image_eq_image
File: Mathlib/Data/Finset/Image.lean

tactic: ext
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.70019
inst✝ : DecidableEq β
f✝ g : α → β
s✝ : Finset α
t✝ : Finset β
a : α
b c : β
f : α → β
s : Finset α
t : Finset β
h : ∀ (x : α), x ∈ s → f x ∈ t
⊢ filter (fun y => y ∈ image f s) t = image f s

tactic: simp only [mem_filter, mem_image, decide_eq_true_eq, and_iff_right_iff_imp, forall_exists_index,
  and_imp]
state_before: case a
α : Type u_1
β : Type u_2
γ : Type ?u.70019
inst✝ : DecidableEq β
f✝ g : α → β
s✝ : Finset α
t✝ : Finset β
a : α
b c : β
f : α → β
s : Finset α
t : Finset β
h : ∀ (x : α), x ∈ s → f x ∈ t
a✝ : β
⊢ a✝ ∈ filter (fun y => y ∈ image f s) t ↔ a✝ ∈ image f s

tactic: rintro x xel rfl
state_before: case a
α : Type u_1
β : Type u_2
γ : Type ?u.70019
inst✝ : DecidableEq β
f✝ g : α → β
s✝ : Finset α
t✝ : Finset β
a : α
b c : β
f : α → β
s : Finset α
t : Finset β
h : ∀ (x : α), x ∈ s → f x ∈ t
a✝ : β
⊢ ∀ (x : α), x ∈ s → f x = a✝ → a✝ ∈ t

tactic: exact h _ xel
state_before: case a
α : Type u_1
β : Type u_2
γ : Type ?u.70019
inst✝ : DecidableEq β
f✝ g : α → β
s✝ : Finset α
t✝ : Finset β
a : α
b c : β
f : α → β
s : Finset α
t : Finset β
h : ∀ (x : α), x ∈ s → f x ∈ t
x : α
xel : x ∈ s
⊢ f x ∈ t
Theorem: Finset.prod_list_count
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: simpa using prod_list_map_count s id
state_before: ι : Type ?u.473637
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
f g : α → β
inst✝² : CommMonoid β
inst✝¹ : DecidableEq α
inst✝ : CommMonoid α
s : List α
⊢ prod s = ∏ m in toFinset s, m ^ count m s
Theorem: Real.toNNReal_pow
File: Mathlib/Data/Real/NNReal.lean

tactic: rw [← NNReal.coe_eq, NNReal.coe_pow, Real.coe_toNNReal _ (pow_nonneg hx _),
  Real.coe_toNNReal x hx]
state_before: x : ℝ
hx : 0 ≤ x
n : ℕ
⊢ toNNReal (x ^ n) = toNNReal x ^ n
Theorem: Prod.rprod_le_transGen_gameAdd
File: Mathlib/Order/GameAdd.lean

tactic: intro _ _ _ _ hα hβ
state_before: α : Type u_1
β : Type u_2
rα : α → α → Prop
rβ : β → β → Prop
x✝¹ x✝ : α × β
h : RProd rα rβ x✝¹ x✝
⊢ ∀ {a₁ : α} {b₁ : β} {a₂ : α} {b₂ : β}, rα a₁ a₂ → rβ b₁ b₂ → Relation.TransGen (GameAdd rα rβ) (a₁, b₁) (a₂, b₂)

tactic: exact Relation.TransGen.tail (Relation.TransGen.single $ GameAdd.fst hα) (GameAdd.snd hβ)
state_before: α : Type u_1
β : Type u_2
rα : α → α → Prop
rβ : β → β → Prop
x✝¹ x✝ : α × β
h : RProd rα rβ x✝¹ x✝
a₁✝ : α
b₁✝ : β
a₂✝ : α
b₂✝ : β
hα : rα a₁✝ a₂✝
hβ : rβ b₁✝ b₂✝
⊢ Relation.TransGen (GameAdd rα rβ) (a₁✝, b₁✝) (a₂✝, b₂✝)
Theorem: AlgebraicTopology.DoldKan.N₁Γ₀_inv_app
File: Mathlib/AlgebraicTopology/DoldKan/GammaCompN.lean

tactic: change (N₁Γ₀.app K).inv = _
state_before: C : Type u_2
inst✝² : Category C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
K : ChainComplex C ℕ
⊢ N₁Γ₀.inv.app K =
    (toKaroubi (ChainComplex C ℕ)).map (Γ₀NondegComplexIso K).inv ≫
      (Splitting.toKaroubiNondegComplexIsoN₁ (Γ₀.splitting K)).hom

tactic: simp only [N₁Γ₀_app]
state_before: C : Type u_2
inst✝² : Category C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
K : ChainComplex C ℕ
⊢ (N₁Γ₀.app K).inv =
    (toKaroubi (ChainComplex C ℕ)).map (Γ₀NondegComplexIso K).inv ≫
      (Splitting.toKaroubiNondegComplexIsoN₁ (Γ₀.splitting K)).hom

tactic: rfl
state_before: C : Type u_2
inst✝² : Category C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
K : ChainComplex C ℕ
⊢ ((Splitting.toKaroubiNondegComplexIsoN₁ (Γ₀.splitting K)).symm ≪≫
        (toKaroubi (ChainComplex C ℕ)).mapIso (Γ₀NondegComplexIso K)).inv =
    (toKaroubi (ChainComplex C ℕ)).map (Γ₀NondegComplexIso K).inv ≫
      (Splitting.toKaroubiNondegComplexIsoN₁ (Γ₀.splitting K)).hom
Theorem: Complex.sin_eq
File: Mathlib/Data/Complex/Exponential.lean

tactic: convert sin_add_mul_I z.re z.im
state_before: x y z : ℂ
⊢ sin z = sin ↑z.re * cosh ↑z.im + cos ↑z.re * sinh ↑z.im * I

tactic: exact (re_add_im z).symm
state_before: case h.e'_2.h.e'_1
x y z : ℂ
⊢ z = ↑z.re + ↑z.im * I
Theorem: MulChar.sum_one_eq_card_units
File: Mathlib/NumberTheory/LegendreSymbol/MulCharacter.lean

tactic: calc
  (∑ a, (1 : MulChar R R') a) = ∑ a : R, if IsUnit a then 1 else 0 :=
    Finset.sum_congr rfl fun a _ => ?_
  _ = ((Finset.univ : Finset R).filter IsUnit).card := Finset.sum_boole
  _ = (Finset.univ.map ⟨((↑) : Rˣ → R), Units.ext⟩).card := ?_
  _ = Fintype.card Rˣ := congr_arg _ (Finset.card_map _)
state_before: R : Type u
inst✝⁴ : CommRing R
R' : Type v
inst✝³ : CommRing R'
R'' : Type w
inst✝² : CommRing R''
inst✝¹ : Fintype R
inst✝ : DecidableEq R
⊢ ∑ a : R, ↑1 a = ↑(Fintype.card Rˣ)

tactic: split_ifs with h
state_before: case calc_1
R : Type u
inst✝⁴ : CommRing R
R' : Type v
inst✝³ : CommRing R'
R'' : Type w
inst✝² : CommRing R''
inst✝¹ : Fintype R
inst✝ : DecidableEq R
a : R
x✝ : a ∈ Finset.univ
⊢ ↑1 a = if IsUnit a then 1 else 0

tactic: exact one_apply_coe h.unit
state_before: case calc_1.inl
R : Type u
inst✝⁴ : CommRing R
R' : Type v
inst✝³ : CommRing R'
R'' : Type w
inst✝² : CommRing R''
inst✝¹ : Fintype R
inst✝ : DecidableEq R
a : R
x✝ : a ∈ Finset.univ
h : IsUnit a
⊢ ↑1 a = 1

tactic: exact map_nonunit _ h
state_before: case calc_1.inr
R : Type u
inst✝⁴ : CommRing R
R' : Type v
inst✝³ : CommRing R'
R'' : Type w
inst✝² : CommRing R''
inst✝¹ : Fintype R
inst✝ : DecidableEq R
a : R
x✝ : a ∈ Finset.univ
h : ¬IsUnit a
⊢ ↑1 a = 0

tactic: congr
state_before: case calc_2
R : Type u
inst✝⁴ : CommRing R
R' : Type v
inst✝³ : CommRing R'
R'' : Type w
inst✝² : CommRing R''
inst✝¹ : Fintype R
inst✝ : DecidableEq R
⊢ ↑(Finset.card (Finset.filter IsUnit Finset.univ)) =
    ↑(Finset.card (Finset.map { toFun := Units.val, inj' := (_ : Function.Injective Units.val) } Finset.univ))

tactic: ext a
state_before: case calc_2.e_a.e_s
R : Type u
inst✝⁴ : CommRing R
R' : Type v
inst✝³ : CommRing R'
R'' : Type w
inst✝² : CommRing R''
inst✝¹ : Fintype R
inst✝ : DecidableEq R
⊢ Finset.filter IsUnit Finset.univ =
    Finset.map { toFun := Units.val, inj' := (_ : Function.Injective Units.val) } Finset.univ

tactic: simp only [Finset.mem_filter, Finset.mem_univ, true_and_iff, Finset.mem_map,
  Function.Embedding.coeFn_mk, exists_true_left, IsUnit]
state_before: case calc_2.e_a.e_s.a
R : Type u
inst✝⁴ : CommRing R
R' : Type v
inst✝³ : CommRing R'
R'' : Type w
inst✝² : CommRing R''
inst✝¹ : Fintype R
inst✝ : DecidableEq R
a : R
⊢ a ∈ Finset.filter IsUnit Finset.univ ↔
    a ∈ Finset.map { toFun := Units.val, inj' := (_ : Function.Injective Units.val) } Finset.univ
Theorem: SimpleGraph.right_nonuniformWitnesses_card
File: Mathlib/Combinatorics/SimpleGraph/Regularity/Uniform.lean

tactic: rw [nonuniformWitnesses, dif_pos h]
state_before: α : Type u_1
𝕜 : Type u_2
inst✝¹ : LinearOrderedField 𝕜
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : 𝕜
s t : Finset α
a b : α
h : ¬IsUniform G ε s t
⊢ ↑(card t) * ε ≤ ↑(card (nonuniformWitnesses G ε s t).snd)

tactic: exact (not_isUniform_iff.1 h).choose_spec.2.choose_spec.2.2.1
state_before: α : Type u_1
𝕜 : Type u_2
inst✝¹ : LinearOrderedField 𝕜
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : 𝕜
s t : Finset α
a b : α
h : ¬IsUniform G ε s t
⊢ ↑(card t) * ε ≤
    ↑(card
        (Exists.choose
              (_ :
                ∃ s',
                  s' ⊆ s ∧
                    ∃ t',
                      t' ⊆ t ∧
                        ↑(card s) * ε ≤ ↑(card s') ∧
                          ↑(card t) * ε ≤ ↑(card t') ∧ ε ≤ ↑(abs (edgeDensity G s' t' - edgeDensity G s t))),
            Exists.choose
              (_ :
                ∃ t',
                  t' ⊆ t ∧
                    ↑(card s) * ε ≤
                        ↑(card
                            (Exists.choose
                              (_ :
                                ∃ s',
                                  s' ⊆ s ∧
                                    ∃ t',
                                      t' ⊆ t ∧
                                        ↑(card s) * ε ≤ ↑(card s') ∧
                                          ↑(card t) * ε ≤ ↑(card t') ∧
                                            ε ≤ ↑(abs (edgeDensity G s' t' - edgeDensity G s t))))) ∧
                      ↑(card t) * ε ≤ ↑(card t') ∧
                        ε ≤
                          ↑(abs
                              (edgeDensity G
                                  (Exists.choose
                                    (_ :
                                      ∃ s',
                                        s' ⊆ s ∧
                                          ∃ t',
                                            t' ⊆ t ∧
                                              ↑(card s) * ε ≤ ↑(card s') ∧
                                                ↑(card t) * ε ≤ ↑(card t') ∧
                                                  ε ≤ ↑(abs (edgeDensity G s' t' - edgeDensity G s t))))
                                  t' -
                                edgeDensity G s t)))).snd)
Theorem: Complex.continuousAt_arg
File: Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean

tactic: have h₀ : abs x ≠ 0 := by
  rw [abs.ne_zero_iff]
  rintro rfl
  simp at h
state_before: x z : ℂ
h : 0 < x.re ∨ x.im ≠ 0
⊢ ContinuousAt arg x

tactic: rw [← lt_or_lt_iff_ne] at h
state_before: x z : ℂ
h : 0 < x.re ∨ x.im ≠ 0
h₀ : ↑abs x ≠ 0
⊢ ContinuousAt arg x

tactic: rcases h with (hx_re | hx_im | hx_im)
state_before: x z : ℂ
h✝ : 0 < x.re ∨ x.im ≠ 0
h : 0 < x.re ∨ x.im < 0 ∨ 0 < x.im
h₀ : ↑abs x ≠ 0
⊢ ContinuousAt arg x

tactic: exacts [(Real.continuousAt_arcsin.comp
        (continuous_im.continuousAt.div continuous_abs.continuousAt h₀)).congr
    (arg_eq_nhds_of_re_pos hx_re).symm,
  (Real.continuous_arccos.continuousAt.comp
          (continuous_re.continuousAt.div continuous_abs.continuousAt h₀)).neg.congr
    (arg_eq_nhds_of_im_neg hx_im).symm,
  (Real.continuous_arccos.continuousAt.comp
        (continuous_re.continuousAt.div continuous_abs.continuousAt h₀)).congr
    (arg_eq_nhds_of_im_pos hx_im).symm]
state_before: case inl
x z : ℂ
h : 0 < x.re ∨ x.im ≠ 0
h₀ : ↑abs x ≠ 0
hx_re : 0 < x.re
⊢ ContinuousAt arg x

case inr.inl
x z : ℂ
h : 0 < x.re ∨ x.im ≠ 0
h₀ : ↑abs x ≠ 0
hx_im : x.im < 0
⊢ ContinuousAt arg x

case inr.inr
x z : ℂ
h : 0 < x.re ∨ x.im ≠ 0
h₀ : ↑abs x ≠ 0
hx_im : 0 < x.im
⊢ ContinuousAt arg x

tactic: rw [abs.ne_zero_iff]
state_before: x z : ℂ
h : 0 < x.re ∨ x.im ≠ 0
⊢ ↑abs x ≠ 0

tactic: rintro rfl
state_before: x z : ℂ
h : 0 < x.re ∨ x.im ≠ 0
⊢ x ≠ 0

tactic: simp at h
state_before: z : ℂ
h : 0 < 0.re ∨ 0.im ≠ 0
⊢ False
Theorem: Finset.prod_apply_ite_of_true
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: simp_rw [apply_ite k]
state_before: ι : Type ?u.408005
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f✝ g✝ : α → β
inst✝ : CommMonoid β
p : α → Prop
hp : DecidablePred p
f g : α → γ
k : γ → β
h : ∀ (x : α), x ∈ s → p x
⊢ ∏ x in s, k (if p x then f x else g x) = ∏ x in s, k (f x)

tactic: exact prod_ite_of_true _ _ h
state_before: ι : Type ?u.408005
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f✝ g✝ : α → β
inst✝ : CommMonoid β
p : α → Prop
hp : DecidablePred p
f g : α → γ
k : γ → β
h : ∀ (x : α), x ∈ s → p x
⊢ (∏ x in s, if p x then k (f x) else k (g x)) = ∏ x in s, k (f x)
Theorem: Doset.doset_union_rightCoset
File: Mathlib/GroupTheory/DoubleCoset.lean

tactic: ext x
state_before: G : Type u_1
inst✝¹ : Group G
α : Type ?u.59583
inst✝ : Mul α
J : Subgroup G
g : G
H K : Subgroup G
a : G
⊢ (⋃ (k : { x // x ∈ K }), rightCoset (↑H) (a * ↑k)) = doset a ↑H ↑K

tactic: simp only [mem_rightCoset_iff, exists_prop, mul_inv_rev, Set.mem_iUnion, mem_doset,
  Subgroup.mem_carrier, SetLike.mem_coe]
state_before: case h
G : Type u_1
inst✝¹ : Group G
α : Type ?u.59583
inst✝ : Mul α
J : Subgroup G
g : G
H K : Subgroup G
a x : G
⊢ (x ∈ ⋃ (k : { x // x ∈ K }), rightCoset (↑H) (a * ↑k)) ↔ x ∈ doset a ↑H ↑K

tactic: constructor
state_before: case h
G : Type u_1
inst✝¹ : Group G
α : Type ?u.59583
inst✝ : Mul α
J : Subgroup G
g : G
H K : Subgroup G
a x : G
⊢ (∃ i, x * ((↑i)⁻¹ * a⁻¹) ∈ H) ↔ ∃ x_1, x_1 ∈ H ∧ ∃ y, y ∈ K ∧ x = x_1 * a * y

tactic: rintro ⟨y, h_h⟩
state_before: case h.mp
G : Type u_1
inst✝¹ : Group G
α : Type ?u.59583
inst✝ : Mul α
J : Subgroup G
g : G
H K : Subgroup G
a x : G
⊢ (∃ i, x * ((↑i)⁻¹ * a⁻¹) ∈ H) → ∃ x_1, x_1 ∈ H ∧ ∃ y, y ∈ K ∧ x = x_1 * a * y

tactic: refine' ⟨x * (y⁻¹ * a⁻¹), h_h, y, y.2, _⟩
state_before: case h.mp.intro
G : Type u_1
inst✝¹ : Group G
α : Type ?u.59583
inst✝ : Mul α
J : Subgroup G
g : G
H K : Subgroup G
a x : G
y : { x // x ∈ K }
h_h : x * ((↑y)⁻¹ * a⁻¹) ∈ H
⊢ ∃ x_1, x_1 ∈ H ∧ ∃ y, y ∈ K ∧ x = x_1 * a * y

tactic: simp only [← mul_assoc, Subgroup.coe_mk, inv_mul_cancel_right, SubgroupClass.coe_inv]
state_before: case h.mp.intro
G : Type u_1
inst✝¹ : Group G
α : Type ?u.59583
inst✝ : Mul α
J : Subgroup G
g : G
H K : Subgroup G
a x : G
y : { x // x ∈ K }
h_h : x * ((↑y)⁻¹ * a⁻¹) ∈ H
⊢ x = x * (↑y⁻¹ * a⁻¹) * a * ↑y

tactic: rintro ⟨x, hx, y, hy, hxy⟩
state_before: case h.mpr
G : Type u_1
inst✝¹ : Group G
α : Type ?u.59583
inst✝ : Mul α
J : Subgroup G
g : G
H K : Subgroup G
a x : G
⊢ (∃ x_1, x_1 ∈ H ∧ ∃ y, y ∈ K ∧ x = x_1 * a * y) → ∃ i, x * ((↑i)⁻¹ * a⁻¹) ∈ H

tactic: refine' ⟨⟨y, hy⟩, _⟩
state_before: case h.mpr.intro.intro.intro.intro
G : Type u_1
inst✝¹ : Group G
α : Type ?u.59583
inst✝ : Mul α
J : Subgroup G
g : G
H K : Subgroup G
a x✝ x : G
hx : x ∈ H
y : G
hy : y ∈ K
hxy : x✝ = x * a * y
⊢ ∃ i, x✝ * ((↑i)⁻¹ * a⁻¹) ∈ H

tactic: simp only [hxy, ← mul_assoc, hx, mul_inv_cancel_right, Subgroup.coe_mk]
state_before: case h.mpr.intro.intro.intro.intro
G : Type u_1
inst✝¹ : Group G
α : Type ?u.59583
inst✝ : Mul α
J : Subgroup G
g : G
H K : Subgroup G
a x✝ x : G
hx : x ∈ H
y : G
hy : y ∈ K
hxy : x✝ = x * a * y
⊢ x✝ * ((↑{ val := y, property := hy })⁻¹ * a⁻¹) ∈ H
Theorem: MeasureTheory.measure_union_lt_top_iff
File: Mathlib/MeasureTheory/Measure/MeasureSpaceDef.lean

tactic: refine' ⟨fun h => ⟨_, _⟩, fun h => measure_union_lt_top h.1 h.2⟩
state_before: α : Type u_1
β : Type ?u.33782
γ : Type ?u.33785
δ : Type ?u.33788
ι : Type ?u.33791
inst✝ : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s s₁ s₂ t : Set α
⊢ ↑↑μ (s ∪ t) < ⊤ ↔ ↑↑μ s < ⊤ ∧ ↑↑μ t < ⊤

tactic: exact (measure_mono (Set.subset_union_left s t)).trans_lt h
state_before: case refine'_1
α : Type u_1
β : Type ?u.33782
γ : Type ?u.33785
δ : Type ?u.33788
ι : Type ?u.33791
inst✝ : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s s₁ s₂ t : Set α
h : ↑↑μ (s ∪ t) < ⊤
⊢ ↑↑μ s < ⊤

tactic: exact (measure_mono (Set.subset_union_right s t)).trans_lt h
state_before: case refine'_2
α : Type u_1
β : Type ?u.33782
γ : Type ?u.33785
δ : Type ?u.33788
ι : Type ?u.33791
inst✝ : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s s₁ s₂ t : Set α
h : ↑↑μ (s ∪ t) < ⊤
⊢ ↑↑μ t < ⊤
Theorem: Array.get?_set
File: Std/Data/Array/Lemmas.lean

tactic: if h : i.1 = j then subst j; simp [*] else simp [*]
state_before: α : Type u_1
a : Array α
i : Fin (size a)
j : Nat
v : α
⊢ (set a i v)[j]? = if i.val = j then some v else a[j]?

tactic: subst j
state_before: α : Type u_1
a : Array α
i : Fin (size a)
j : Nat
v : α
h : i.val = j
⊢ (set a i v)[j]? = if i.val = j then some v else a[j]?

tactic: simp [*]
state_before: α : Type u_1
a : Array α
i : Fin (size a)
v : α
⊢ (set a i v)[i.val]? = if i.val = i.val then some v else a[i.val]?

tactic: simp [*]
state_before: α : Type u_1
a : Array α
i : Fin (size a)
j : Nat
v : α
h : ¬i.val = j
⊢ (set a i v)[j]? = if i.val = j then some v else a[j]?
Theorem: UniqueFactorizationMonoid.factors_mul
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: refine'
  factors_unique irreducible_of_factor
    (fun a ha =>
      (Multiset.mem_add.mp ha).by_cases (irreducible_of_factor _) (irreducible_of_factor _))
    ((factors_prod (mul_ne_zero hx hy)).trans _)
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : DecidableEq α
inst✝ : UniqueFactorizationMonoid α
x y : α
hx : x ≠ 0
hy : y ≠ 0
⊢ Multiset.Rel Associated (factors (x * y)) (factors x + factors y)

tactic: rw [Multiset.prod_add]
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : DecidableEq α
inst✝ : UniqueFactorizationMonoid α
x y : α
hx : x ≠ 0
hy : y ≠ 0
⊢ x * y ~ᵤ Multiset.prod (factors x + factors y)

tactic: exact (Associated.mul_mul (factors_prod hx) (factors_prod hy)).symm
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : DecidableEq α
inst✝ : UniqueFactorizationMonoid α
x y : α
hx : x ≠ 0
hy : y ≠ 0
⊢ x * y ~ᵤ Multiset.prod (factors x) * Multiset.prod (factors y)
Theorem: Basis.range_reindex
File: Mathlib/LinearAlgebra/Basis.lean

tactic: simp [coe_reindex, range_comp]
state_before: ι : Type u_4
ι' : Type u_2
R : Type u_3
R₂ : Type ?u.369229
K : Type ?u.369232
M : Type u_1
M' : Type ?u.369238
M'' : Type ?u.369241
V : Type u
V' : Type ?u.369246
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
b b₁ : Basis ι R M
i : ι
c : R
x : M
b' : Basis ι' R M'
e : ι ≃ ι'
⊢ range ↑(reindex b e) = range ↑b
Theorem: neg_vsub_eq_vsub_rev
File: Mathlib/Algebra/AddTorsor.lean

tactic: refine' neg_eq_of_add_eq_zero_right (vadd_right_cancel p1 _)
state_before: G : Type u_1
P : Type u_2
inst✝ : AddGroup G
T : AddTorsor G P
p1 p2 : P
⊢ -(p1 -ᵥ p2) = p2 -ᵥ p1

tactic: rw [vsub_add_vsub_cancel, vsub_self]
state_before: G : Type u_1
P : Type u_2
inst✝ : AddGroup G
T : AddTorsor G P
p1 p2 : P
⊢ p1 -ᵥ p2 + (p2 -ᵥ p1) +ᵥ p1 = 0 +ᵥ p1
Theorem: RingHom.ker_eq_bot_iff_eq_zero
File: Mathlib/RingTheory/Ideal/Operations.lean

tactic: rw [← injective_iff_map_eq_zero f, injective_iff_ker_eq_bot]
state_before: R : Type u
S : Type v
T : Type w
F : Type u_1
inst✝¹ : Ring R
inst✝ : Semiring S
rc : RingHomClass F R S
f : F
⊢ ker f = ⊥ ↔ ∀ (x : R), ↑f x = 0 → x = 0
Theorem: ConvexOn.map_sum_le
File: Mathlib/Analysis/Convex/Jensen.lean

tactic: simpa only [centerMass, h₁, inv_one, one_smul] using
  hf.map_centerMass_le h₀ (h₁.symm ▸ zero_lt_one) hmem
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.21381
β : Type u_3
ι : Type u_4
inst✝⁵ : LinearOrderedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : OrderedAddCommGroup β
inst✝² : Module 𝕜 E
inst✝¹ : Module 𝕜 β
inst✝ : OrderedSMul 𝕜 β
s : Set E
f : E → β
t : Finset ι
w : ι → 𝕜
p : ι → E
hf : ConvexOn 𝕜 s f
h₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i
h₁ : ∑ i in t, w i = 1
hmem : ∀ (i : ι), i ∈ t → p i ∈ s
⊢ f (∑ i in t, w i • p i) ≤ ∑ i in t, w i • f (p i)
Theorem: Function.mulSupport_binop_subset
File: Mathlib/Algebra/Support.lean

tactic: simp only [hf, hg, op1]
state_before: α : Type u_4
β : Type ?u.9665
A : Type ?u.9668
B : Type ?u.9671
M : Type u_2
N : Type u_3
P : Type u_1
R : Type ?u.9683
S : Type ?u.9686
G : Type ?u.9689
M₀ : Type ?u.9692
G₀ : Type ?u.9695
ι : Sort ?u.9698
inst✝² : One M
inst✝¹ : One N
inst✝ : One P
op : M → N → P
op1 : op 1 1 = 1
f : α → M
g : α → N
x : α
hx : x ∈ mulSupport fun x => op (f x) (g x)
hf : f x = 1
hg : g x = 1
⊢ (fun x => op (f x) (g x)) x = 1
Theorem: Nat.mem_divisors
File: Mathlib/NumberTheory/Divisors.lean

tactic: rcases eq_or_ne m 0 with (rfl | hm)
state_before: n m : ℕ
⊢ n ∈ divisors m ↔ n ∣ m ∧ m ≠ 0

tactic: simp only [hm, Ne.def, not_false_iff, and_true_iff, ← filter_dvd_eq_divisors hm, mem_filter,
  mem_range, and_iff_right_iff_imp, lt_succ_iff]
state_before: case inr
n m : ℕ
hm : m ≠ 0
⊢ n ∈ divisors m ↔ n ∣ m ∧ m ≠ 0

tactic: exact le_of_dvd hm.bot_lt
state_before: case inr
n m : ℕ
hm : m ≠ 0
⊢ n ∣ m → n ≤ m

tactic: simp [divisors]
state_before: case inl
n : ℕ
⊢ n ∈ divisors 0 ↔ n ∣ 0 ∧ 0 ≠ 0
Theorem: Nat.eq_pow_of_factorization_eq_single
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: rw [← Nat.factorization_prod_pow_eq_self hn, h, Finsupp.prod_single_index]
state_before: n p k : ℕ
hn : n ≠ 0
h : factorization n = single p k
⊢ n = p ^ k

tactic: simp
state_before: n p k : ℕ
hn : n ≠ 0
h : factorization n = single p k
⊢ p ^ 0 = 1
Theorem: List.mapM_cons
File: Std/Data/List/Init/Lemmas.lean

tactic: simp [← mapM'_eq_mapM]
state_before: m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
a : α
l : List α
inst✝¹ : Monad m
inst✝ : LawfulMonad m
f : α → m β
⊢ mapM f (a :: l) = do
    let __do_lift ← f a
    let __do_lift_1 ← mapM f l
    pure (__do_lift :: __do_lift_1)