1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: PNat.factorMultiset_pow
File: Mathlib/Data/PNat/Factors.lean

tactic: let u := factorMultiset n
state_before: n : ℕ+
m : ℕ
⊢ (n ^ m).factorMultiset = m • n.factorMultiset
state_after: n : ℕ+
m : ℕ
u : PrimeMultiset := n.factorMultiset
⊢ (n ^ m).factorMultiset = m • n.factorMultiset

tactic: have : n = u.prod := (prod_factorMultiset n).symm
state_before: n : ℕ+
m : ℕ
u : PrimeMultiset := n.factorMultiset
⊢ (n ^ m).factorMultiset = m • n.factorMultiset
state_after: n : ℕ+
m : ℕ
u : PrimeMultiset := n.factorMultiset
this : n = u.prod
⊢ (n ^ m).factorMultiset = m • n.factorMultiset

tactic: rw [this, ← PrimeMultiset.prod_smul]
state_before: n : ℕ+
m : ℕ
u : PrimeMultiset := n.factorMultiset
this : n = u.prod
⊢ (n ^ m).factorMultiset = m • n.factorMultiset
state_after: n : ℕ+
m : ℕ
u : PrimeMultiset := n.factorMultiset
this : n = u.prod
⊢ (m • u).prod.factorMultiset = m • u.prod.factorMultiset

tactic: repeat' rw [PrimeMultiset.factorMultiset_prod]
state_before: n : ℕ+
m : ℕ
u : PrimeMultiset := n.factorMultiset
this : n = u.prod
⊢ (m • u).prod.factorMultiset = m • u.prod.factorMultiset
state_after: no goals

tactic: rw [PrimeMultiset.factorMultiset_prod]
state_before: n : ℕ+
m : ℕ
u : PrimeMultiset := n.factorMultiset
this : n = u.prod
⊢ m • u = m • u.prod.factorMultiset
state_after: no goals
Theorem: orderOf_pow_of_dvd
File: Mathlib/GroupTheory/OrderOfElement.lean

tactic: rw [orderOf_pow' _ hn, Nat.gcd_eq_right dvd]
state_before: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : Monoid G
a b x✝ y : G
n✝ m : ℕ
x : G
n : ℕ
hn : n ≠ 0
dvd : n ∣ orderOf x
⊢ orderOf (x ^ n) = orderOf x / n
state_after: no goals
Theorem: eq_or_eq_inv_of_mabs_eq
File: Mathlib/Algebra/Order/Group/Abs.lean

tactic: simpa only [← h, eq_comm (a := |a|ₘ), inv_eq_iff_eq_inv] using mabs_choice a
state_before: α : Type u_1
inst✝¹ : Group α
inst✝ : LinearOrder α
a b : α
h : mabs a = b
⊢ a = b ∨ a = b⁻¹
state_after: no goals
Theorem: Representation.averageMap_invariant
File: Mathlib/RepresentationTheory/Invariants.lean

tactic: rw [averageMap, ← asAlgebraHom_single_one, ← LinearMap.mul_apply, ← map_mul (asAlgebraHom ρ),
  mul_average_left]
state_before: k : Type u_1
G : Type u_2
V : Type u_3
inst✝⁵ : CommSemiring k
inst✝⁴ : Group G
inst✝³ : AddCommMonoid V
inst✝² : Module k V
ρ : Representation k G V
inst✝¹ : Fintype G
inst✝ : Invertible ↑(Fintype.card G)
v : V
g : G
⊢ (ρ g) (ρ.averageMap v) = ρ.averageMap v
state_after: no goals
Theorem: Matrix.zpow_add_one
File: Mathlib/LinearAlgebra/Matrix/ZPow.lean

tactic: simp only [← Nat.cast_succ, pow_succ, zpow_natCast]
state_before: n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A : M
h : IsUnit A.det
n : ℕ
⊢ A ^ (↑n + 1) = A ^ ↑n * A
state_after: no goals

tactic: rw [neg_add, neg_add_cancel_right, zpow_neg h, zpow_natCast]
state_before: n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A : M
h : IsUnit A.det
n : ℕ
⊢ A ^ (-(↑n + 1) + 1) = (A ^ n)⁻¹
state_after: no goals

tactic: rw [mul_inv_rev, Matrix.mul_assoc, nonsing_inv_mul _ h, Matrix.mul_one]
state_before: n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A : M
h : IsUnit A.det
n : ℕ
⊢ (A ^ n)⁻¹ = (A * A ^ n)⁻¹ * A
state_after: no goals

tactic: rw [zpow_neg h, ← Int.ofNat_succ, zpow_natCast, pow_succ']
state_before: n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A : M
h : IsUnit A.det
n : ℕ
⊢ (A * A ^ n)⁻¹ * A = A ^ (-(↑n + 1)) * A
state_after: no goals
Theorem: Set.ssubset_toFinset
File: Mathlib/Data/Fintype/Basic.lean

tactic: rw [← Finset.coe_ssubset, coe_toFinset]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
s✝ t : Set α
s : Finset α
inst✝ : Fintype ↑t
⊢ s ⊂ t.toFinset ↔ ↑s ⊂ t
state_after: no goals
Theorem: NormedSpace.exp_sum
File: Mathlib/Analysis/NormedSpace/Exponential.lean

tactic: rw [exp_sum_of_commute, Finset.noncommProd_eq_prod]
state_before: 𝕂 : Type u_1
𝔸 : Type u_2
inst✝³ : RCLike 𝕂
inst✝² : NormedCommRing 𝔸
inst✝¹ : NormedAlgebra 𝕂 𝔸
inst✝ : CompleteSpace 𝔸
ι : Type u_3
s : Finset ι
f : ι → 𝔸
⊢ exp 𝕂 (∑ i ∈ s, f i) = ∏ i ∈ s, exp 𝕂 (f i)
state_after: case h
𝕂 : Type u_1
𝔸 : Type u_2
inst✝³ : RCLike 𝕂
inst✝² : NormedCommRing 𝔸
inst✝¹ : NormedAlgebra 𝕂 𝔸
inst✝ : CompleteSpace 𝔸
ι : Type u_3
s : Finset ι
f : ι → 𝔸
⊢ (↑s).Pairwise fun i j => Commute (f i) (f j)

tactic: exact fun i _hi j _hj _ => Commute.all _ _
state_before: case h
𝕂 : Type u_1
𝔸 : Type u_2
inst✝³ : RCLike 𝕂
inst✝² : NormedCommRing 𝔸
inst✝¹ : NormedAlgebra 𝕂 𝔸
inst✝ : CompleteSpace 𝔸
ι : Type u_3
s : Finset ι
f : ι → 𝔸
⊢ (↑s).Pairwise fun i j => Commute (f i) (f j)
state_after: no goals
Theorem: MulAction.pow_smul_eq_iff_period_dvd
File: Mathlib/Dynamics/PeriodicPts.lean

tactic: rw [period_eq_minimalPeriod, ← isPeriodicPt_iff_minimalPeriod_dvd, isPeriodicPt_smul_iff]
state_before: α : Type v
G : Type u
inst✝³ : Group G
inst✝² : MulAction G α
M : Type u
inst✝¹ : Monoid M
inst✝ : MulAction M α
n : ℕ
m : M
a : α
⊢ m ^ n • a = a ↔ period m a ∣ n
state_after: no goals
Theorem: List.lookmap.go_append
File: Mathlib/Data/List/Basic.lean

tactic: cases l with
| nil => rfl
| cons hd tl =>
  rw [lookmap, go, go]
  cases f hd with
  | none => simp only [go_append tl _, Array.toListAppend_eq, append_assoc, Array.push_data]; rfl
  | some a => rfl
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → Option α
l : List α
acc : Array α
⊢ go f l acc = acc.toListAppend (lookmap f l)
state_after: no goals

tactic: rfl
state_before: case nil
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → Option α
acc : Array α
⊢ go f [] acc = acc.toListAppend (lookmap f [])
state_after: no goals

tactic: rw [lookmap, go, go]
state_before: case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → Option α
acc : Array α
hd : α
tl : List α
⊢ go f (hd :: tl) acc = acc.toListAppend (lookmap f (hd :: tl))
state_after: case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → Option α
acc : Array α
hd : α
tl : List α
⊢ (match f hd with
    | some b => acc.toListAppend (b :: tl)
    | none => go f tl (acc.push hd)) =
    acc.toListAppend
      (match f hd with
      | some b => #[].toListAppend (b :: tl)
      | none => go f tl (#[].push hd))

tactic: cases f hd with
| none => simp only [go_append tl _, Array.toListAppend_eq, append_assoc, Array.push_data]; rfl
| some a => rfl
state_before: case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → Option α
acc : Array α
hd : α
tl : List α
⊢ (match f hd with
    | some b => acc.toListAppend (b :: tl)
    | none => go f tl (acc.push hd)) =
    acc.toListAppend
      (match f hd with
      | some b => #[].toListAppend (b :: tl)
      | none => go f tl (#[].push hd))
state_after: no goals

tactic: simp only [go_append tl _, Array.toListAppend_eq, append_assoc, Array.push_data]
state_before: case cons.none
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → Option α
acc : Array α
hd : α
tl : List α
⊢ (match none with
    | some b => acc.toListAppend (b :: tl)
    | none => go f tl (acc.push hd)) =
    acc.toListAppend
      (match none with
      | some b => #[].toListAppend (b :: tl)
      | none => go f tl (#[].push hd))
state_after: case cons.none
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → Option α
acc : Array α
hd : α
tl : List α
⊢ acc.data ++ ([hd] ++ lookmap f tl) = acc.data ++ (#[].data ++ ([hd] ++ lookmap f tl))

tactic: rfl
state_before: case cons.none
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → Option α
acc : Array α
hd : α
tl : List α
⊢ acc.data ++ ([hd] ++ lookmap f tl) = acc.data ++ (#[].data ++ ([hd] ++ lookmap f tl))
state_after: no goals

tactic: rfl
state_before: case cons.some
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → Option α
acc : Array α
hd : α
tl : List α
a : α
⊢ (match some a with
    | some b => acc.toListAppend (b :: tl)
    | none => go f tl (acc.push hd)) =
    acc.toListAppend
      (match some a with
      | some b => #[].toListAppend (b :: tl)
      | none => go f tl (#[].push hd))
state_after: no goals
Theorem: CategoryTheory.Presieve.Arrows.Compatible.exists_familyOfElements
File: Mathlib/CategoryTheory/Sites/IsSheafFor.lean

tactic: choose i h h' using @ofArrows_surj _ _ _ _ _ π
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
P Q U : Cᵒᵖ ⥤ Type w
X✝ Y : C
S : Sieve X✝
R : Presieve X✝
B : C
I : Type u_1
X : I → C
π : (i : I) → X i ⟶ B
x : (i : I) → P.obj { unop := X i }
hx : Compatible P π x
⊢ ∃ x', ∀ (i : I), x' (π i) ⋯ = x i
state_after: C : Type u₁
inst✝ : Category.{v₁, u₁} C
P Q U : Cᵒᵖ ⥤ Type w
X✝ Y : C
S : Sieve X✝
R : Presieve X✝
B : C
I : Type u_1
X : I → C
π : (i : I) → X i ⟶ B
x : (i : I) → P.obj { unop := X i }
hx : Compatible P π x
i : {Z : C} → (g : Z ⟶ B) → ofArrows X π g → I
h : ∀ {Z : C} (g : Z ⟶ B) (hg : ofArrows X π g), X (i g hg) = Z
h' : ∀ {Z : C} (g : Z ⟶ B) (hg : ofArrows X π g), g = eqToHom ⋯ ≫ π (i g hg)
⊢ ∃ x', ∀ (i : I), x' (π i) ⋯ = x i

tactic: exact ⟨fun Y f hf ↦ P.map (eqToHom (h f hf).symm).op (x _),
  fun j ↦ (hx _ j (X j) _ (𝟙 _) <| by rw [← h', id_comp]).trans <| by simp⟩
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
P Q U : Cᵒᵖ ⥤ Type w
X✝ Y : C
S : Sieve X✝
R : Presieve X✝
B : C
I : Type u_1
X : I → C
π : (i : I) → X i ⟶ B
x : (i : I) → P.obj { unop := X i }
hx : Compatible P π x
i : {Z : C} → (g : Z ⟶ B) → ofArrows X π g → I
h : ∀ {Z : C} (g : Z ⟶ B) (hg : ofArrows X π g), X (i g hg) = Z
h' : ∀ {Z : C} (g : Z ⟶ B) (hg : ofArrows X π g), g = eqToHom ⋯ ≫ π (i g hg)
⊢ ∃ x', ∀ (i : I), x' (π i) ⋯ = x i
state_after: no goals

tactic: rw [← h', id_comp]
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
P Q U : Cᵒᵖ ⥤ Type w
X✝ Y : C
S : Sieve X✝
R : Presieve X✝
B : C
I : Type u_1
X : I → C
π : (i : I) → X i ⟶ B
x : (i : I) → P.obj { unop := X i }
hx : Compatible P π x
i : {Z : C} → (g : Z ⟶ B) → ofArrows X π g → I
h : ∀ {Z : C} (g : Z ⟶ B) (hg : ofArrows X π g), X (i g hg) = Z
h' : ∀ {Z : C} (g : Z ⟶ B) (hg : ofArrows X π g), g = eqToHom ⋯ ≫ π (i g hg)
j : I
⊢ eqToHom ⋯ ≫ π (i (π j) ⋯) = 𝟙 (X j) ≫ π j
state_after: no goals

tactic: simp
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
P Q U : Cᵒᵖ ⥤ Type w
X✝ Y : C
S : Sieve X✝
R : Presieve X✝
B : C
I : Type u_1
X : I → C
π : (i : I) → X i ⟶ B
x : (i : I) → P.obj { unop := X i }
hx : Compatible P π x
i : {Z : C} → (g : Z ⟶ B) → ofArrows X π g → I
h : ∀ {Z : C} (g : Z ⟶ B) (hg : ofArrows X π g), X (i g hg) = Z
h' : ∀ {Z : C} (g : Z ⟶ B) (hg : ofArrows X π g), g = eqToHom ⋯ ≫ π (i g hg)
j : I
⊢ P.map (𝟙 (X j)).op (x j) = x j
state_after: no goals
Theorem: Sym2.other_spec
File: Mathlib/Data/Sym/Sym2.lean

tactic: erw [← Classical.choose_spec h]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
a : α
z : Sym2 α
h : a ∈ z
⊢ s(a, Mem.other h) = z
state_after: no goals
Theorem: CategoryTheory.Quotient.sound
File: Mathlib/CategoryTheory/Quotient.lean

tactic: simpa using Quot.sound (CompClosure.intro (𝟙 a) f₁ f₂ (𝟙 b) h)
state_before: C : Type u_2
inst✝ : Category.{u_1, u_2} C
r : HomRel C
a b : C
f₁ f₂ : a ⟶ b
h : r f₁ f₂
⊢ (functor r).map f₁ = (functor r).map f₂
state_after: no goals
Theorem: Set.Ioc_union_left
File: Mathlib/Order/Interval/Set/Basic.lean

tactic: rw [← Icc_diff_left, diff_union_self,
  union_eq_self_of_subset_right (singleton_subset_iff.2 <| left_mem_Icc.2 hab)]
state_before: α : Type u_1
β : Type u_2
inst✝ : PartialOrder α
a b c : α
hab : a ≤ b
⊢ Ioc a b ∪ {a} = Icc a b
state_after: no goals
Theorem: List.Perm.length_eq
File: .lake/packages/batteries/Batteries/Data/List/Perm.lean

tactic: induction p with
| nil => rfl
| cons _ _ ih => simp only [length_cons, ih]
| swap => rfl
| trans _ _ ih₁ ih₂ => simp only [ih₁, ih₂]
state_before: α : Type u_1
l₁ l₂ : List α
p : l₁ ~ l₂
⊢ l₁.length = l₂.length
state_after: no goals

tactic: rfl
state_before: case nil
α : Type u_1
l₁ l₂ : List α
⊢ [].length = [].length
state_after: no goals

tactic: simp only [length_cons, ih]
state_before: case cons
α : Type u_1
l₁ l₂ : List α
x✝ : α
l₁✝ l₂✝ : List α
a✝ : l₁✝ ~ l₂✝
ih : l₁✝.length = l₂✝.length
⊢ (x✝ :: l₁✝).length = (x✝ :: l₂✝).length
state_after: no goals

tactic: rfl
state_before: case swap
α : Type u_1
l₁ l₂ : List α
x✝ y✝ : α
l✝ : List α
⊢ (y✝ :: x✝ :: l✝).length = (x✝ :: y✝ :: l✝).length
state_after: no goals

tactic: simp only [ih₁, ih₂]
state_before: case trans
α : Type u_1
l₁ l₂ l₁✝ l₂✝ l₃✝ : List α
a✝¹ : l₁✝ ~ l₂✝
a✝ : l₂✝ ~ l₃✝
ih₁ : l₁✝.length = l₂✝.length
ih₂ : l₂✝.length = l₃✝.length
⊢ l₁✝.length = l₃✝.length
state_after: no goals
Theorem: QuotientGroup.eq_class_eq_leftCoset
File: Mathlib/GroupTheory/Coset.lean

tactic: rw [mem_leftCoset_iff, Set.mem_setOf_eq, eq_comm, QuotientGroup.eq, SetLike.mem_coe]
state_before: α : Type u_1
inst✝ : Group α
s✝ : Subgroup α
a b : α
s : Subgroup α
g z : α
⊢ z ∈ {x | ↑x = ↑g} ↔ z ∈ g • ↑s
state_after: no goals
Theorem: Sym2.card_subtype_diag
File: Mathlib/Data/Sym/Card.lean

tactic: convert card_image_diag (univ : Finset α)
state_before: α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
⊢ Fintype.card { a // a.IsDiag } = Fintype.card α
state_after: case h.e'_2
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
⊢ Fintype.card { a // a.IsDiag } = (image Sym2.mk univ.diag).card

tactic: rw [← filter_image_mk_isDiag, Fintype.card_of_subtype]
state_before: case h.e'_2
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
⊢ Fintype.card { a // a.IsDiag } = (image Sym2.mk univ.diag).card
state_after: case h.e'_2.H
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
⊢ ∀ (x : Sym2 α), x ∈ filter IsDiag (image Sym2.mk (univ ×ˢ univ)) ↔ x.IsDiag

tactic: rintro x
state_before: case h.e'_2.H
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
⊢ ∀ (x : Sym2 α), x ∈ filter IsDiag (image Sym2.mk (univ ×ˢ univ)) ↔ x.IsDiag
state_after: case h.e'_2.H
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
x : Sym2 α
⊢ x ∈ filter IsDiag (image Sym2.mk (univ ×ˢ univ)) ↔ x.IsDiag

tactic: rw [mem_filter, univ_product_univ, mem_image]
state_before: case h.e'_2.H
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
x : Sym2 α
⊢ x ∈ filter IsDiag (image Sym2.mk (univ ×ˢ univ)) ↔ x.IsDiag
state_after: case h.e'_2.H
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
x : Sym2 α
⊢ (∃ a ∈ univ, Sym2.mk a = x) ∧ x.IsDiag ↔ x.IsDiag

tactic: obtain ⟨a, ha⟩ := Quot.exists_rep x
state_before: case h.e'_2.H
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
x : Sym2 α
⊢ (∃ a ∈ univ, Sym2.mk a = x) ∧ x.IsDiag ↔ x.IsDiag
state_after: case h.e'_2.H.intro
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
x : Sym2 α
a : α × α
ha : Quot.mk (Rel α) a = x
⊢ (∃ a ∈ univ, Sym2.mk a = x) ∧ x.IsDiag ↔ x.IsDiag

tactic: exact and_iff_right ⟨a, mem_univ _, ha⟩
state_before: case h.e'_2.H.intro
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
x : Sym2 α
a : α × α
ha : Quot.mk (Rel α) a = x
⊢ (∃ a ∈ univ, Sym2.mk a = x) ∧ x.IsDiag ↔ x.IsDiag
state_after: no goals
Theorem: Set.subset_eval_image_pi
File: Mathlib/Data/Set/Prod.lean

tactic: classical
obtain ⟨f, hf⟩ := ht
refine fun y hy => ⟨update f i y, fun j hj => ?_, update_same _ _ _⟩
obtain rfl | hji := eq_or_ne j i <;> simp [*, hf _ hj]
state_before: ι : Type u_1
α : ι → Type u_2
β : ι → Type u_3
s s₁ s₂ : Set ι
t t₁ t₂ : (i : ι) → Set (α i)
i✝ : ι
ht : (s.pi t).Nonempty
i : ι
⊢ t i ⊆ eval i '' s.pi t
state_after: no goals

tactic: obtain ⟨f, hf⟩ := ht
state_before: ι : Type u_1
α : ι → Type u_2
β : ι → Type u_3
s s₁ s₂ : Set ι
t t₁ t₂ : (i : ι) → Set (α i)
i✝ : ι
ht : (s.pi t).Nonempty
i : ι
⊢ t i ⊆ eval i '' s.pi t
state_after: case intro
ι : Type u_1
α : ι → Type u_2
β : ι → Type u_3
s s₁ s₂ : Set ι
t t₁ t₂ : (i : ι) → Set (α i)
i✝ i : ι
f : (i : ι) → α i
hf : f ∈ s.pi t
⊢ t i ⊆ eval i '' s.pi t

tactic: refine fun y hy => ⟨update f i y, fun j hj => ?_, update_same _ _ _⟩
state_before: case intro
ι : Type u_1
α : ι → Type u_2
β : ι → Type u_3
s s₁ s₂ : Set ι
t t₁ t₂ : (i : ι) → Set (α i)
i✝ i : ι
f : (i : ι) → α i
hf : f ∈ s.pi t
⊢ t i ⊆ eval i '' s.pi t
state_after: case intro
ι : Type u_1
α : ι → Type u_2
β : ι → Type u_3
s s₁ s₂ : Set ι
t t₁ t₂ : (i : ι) → Set (α i)
i✝ i : ι
f : (i : ι) → α i
hf : f ∈ s.pi t
y : α i
hy : y ∈ t i
j : ι
hj : j ∈ s
⊢ update f i y j ∈ t j

tactic: obtain rfl | hji := eq_or_ne j i <;> simp [*, hf _ hj]
state_before: case intro
ι : Type u_1
α : ι → Type u_2
β : ι → Type u_3
s s₁ s₂ : Set ι
t t₁ t₂ : (i : ι) → Set (α i)
i✝ i : ι
f : (i : ι) → α i
hf : f ∈ s.pi t
y : α i
hy : y ∈ t i
j : ι
hj : j ∈ s
⊢ update f i y j ∈ t j
state_after: no goals
Theorem: Polynomial.natDegree_multiset_prod
File: Mathlib/Algebra/Polynomial/BigOperators.lean

tactic: nontriviality R
state_before: R : Type u
ι : Type w
s : Finset ι
inst✝¹ : CommSemiring R
inst✝ : NoZeroDivisors R
f : ι → R[X]
t : Multiset R[X]
h : 0 ∉ t
⊢ t.prod.natDegree = (Multiset.map natDegree t).sum
state_after: R : Type u
ι : Type w
s : Finset ι
inst✝¹ : CommSemiring R
inst✝ : NoZeroDivisors R
f : ι → R[X]
t : Multiset R[X]
h : 0 ∉ t
a✝ : Nontrivial R
⊢ t.prod.natDegree = (Multiset.map natDegree t).sum

tactic: rw [natDegree_multiset_prod']
state_before: R : Type u
ι : Type w
s : Finset ι
inst✝¹ : CommSemiring R
inst✝ : NoZeroDivisors R
f : ι → R[X]
t : Multiset R[X]
h : 0 ∉ t
a✝ : Nontrivial R
⊢ t.prod.natDegree = (Multiset.map natDegree t).sum
state_after: case h
R : Type u
ι : Type w
s : Finset ι
inst✝¹ : CommSemiring R
inst✝ : NoZeroDivisors R
f : ι → R[X]
t : Multiset R[X]
h : 0 ∉ t
a✝ : Nontrivial R
⊢ (Multiset.map (fun f => f.leadingCoeff) t).prod ≠ 0

tactic: simp_rw [Ne, Multiset.prod_eq_zero_iff, Multiset.mem_map, leadingCoeff_eq_zero]
state_before: case h
R : Type u
ι : Type w
s : Finset ι
inst✝¹ : CommSemiring R
inst✝ : NoZeroDivisors R
f : ι → R[X]
t : Multiset R[X]
h : 0 ∉ t
a✝ : Nontrivial R
⊢ (Multiset.map (fun f => f.leadingCoeff) t).prod ≠ 0
state_after: case h
R : Type u
ι : Type w
s : Finset ι
inst✝¹ : CommSemiring R
inst✝ : NoZeroDivisors R
f : ι → R[X]
t : Multiset R[X]
h : 0 ∉ t
a✝ : Nontrivial R
⊢ ¬∃ a ∈ t, a = 0

tactic: rintro ⟨_, h, rfl⟩
state_before: case h
R : Type u
ι : Type w
s : Finset ι
inst✝¹ : CommSemiring R
inst✝ : NoZeroDivisors R
f : ι → R[X]
t : Multiset R[X]
h : 0 ∉ t
a✝ : Nontrivial R
⊢ ¬∃ a ∈ t, a = 0
state_after: case h.intro.intro
R : Type u
ι : Type w
s : Finset ι
inst✝¹ : CommSemiring R
inst✝ : NoZeroDivisors R
f : ι → R[X]
t : Multiset R[X]
h✝ : 0 ∉ t
a✝ : Nontrivial R
h : 0 ∈ t
⊢ False

tactic: contradiction
state_before: case h.intro.intro
R : Type u
ι : Type w
s : Finset ι
inst✝¹ : CommSemiring R
inst✝ : NoZeroDivisors R
f : ι → R[X]
t : Multiset R[X]
h✝ : 0 ∉ t
a✝ : Nontrivial R
h : 0 ∈ t
⊢ False
state_after: no goals
Theorem: Polynomial.eq_X_add_C_of_degree_eq_one
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

tactic: rw [← Nat.cast_one] at h
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
h : p.degree = 1
⊢ C (p.coeff 1) * X + C (p.coeff 0) = C p.leadingCoeff * X + C (p.coeff 0)
state_after: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
h : p.degree = ↑1
⊢ C (p.coeff 1) * X + C (p.coeff 0) = C p.leadingCoeff * X + C (p.coeff 0)

tactic: rw [leadingCoeff, natDegree_eq_of_degree_eq_some h]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
h : p.degree = ↑1
⊢ C (p.coeff 1) * X + C (p.coeff 0) = C p.leadingCoeff * X + C (p.coeff 0)
state_after: no goals
Theorem: Nat.card_Iic
File: Mathlib/Order/Interval/Finset/Nat.lean

tactic: rw [Iic_eq_Icc, card_Icc, Nat.bot_eq_zero, Nat.sub_zero]
state_before: a b c : ℕ
⊢ (Iic b).card = b + 1
state_after: no goals
Theorem: IsLocalization.Away.mul_invSelf
File: Mathlib/RingTheory/Localization/Away/Basic.lean

tactic: convert IsLocalization.mk'_mul_mk'_eq_one (M := Submonoid.powers x) (S := S) _ 1
state_before: R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
x : R
inst✝ : Away x S
⊢ (algebraMap R S) x * invSelf x = 1
state_after: case h.e'_2.h.e'_5
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
x : R
inst✝ : Away x S
⊢ (algebraMap R S) x = mk' S (↑⟨x, ⋯⟩) 1

tactic: symm
state_before: case h.e'_2.h.e'_5
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
x : R
inst✝ : Away x S
⊢ (algebraMap R S) x = mk' S (↑⟨x, ⋯⟩) 1
state_after: case h.e'_2.h.e'_5
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
x : R
inst✝ : Away x S
⊢ mk' S (↑⟨x, ⋯⟩) 1 = (algebraMap R S) x

tactic: apply IsLocalization.mk'_one
state_before: case h.e'_2.h.e'_5
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
x : R
inst✝ : Away x S
⊢ mk' S (↑⟨x, ⋯⟩) 1 = (algebraMap R S) x
state_after: no goals
Theorem: MeasureTheory.OuterMeasure.le_sum_caratheodory
File: Mathlib/MeasureTheory/OuterMeasure/Caratheodory.lean

tactic: simp [fun i => MeasurableSpace.measurableSet_iInf.1 h i t, ENNReal.tsum_add]
state_before: α : Type u_1
ι : Type u_2
m : ι → OuterMeasure α
s : Set α
h : MeasurableSet s
t : Set α
⊢ (sum m) t = (sum m) (t ∩ s) + (sum m) (t \ s)
state_after: no goals
Theorem: Finset.disjoint_biUnion_right
File: Mathlib/Data/Finset/Union.lean

tactic: simpa only [_root_.disjoint_comm] using disjoint_biUnion_left t f s
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
s✝ s₁ s₂ : Finset α
t✝ t₁ t₂ : α → Finset β
inst✝ : DecidableEq β
s : Finset β
t : Finset α
f : α → Finset β
⊢ Disjoint s (t.biUnion f) ↔ ∀ i ∈ t, Disjoint s (f i)
state_after: no goals
Theorem: EuclideanDomain.mul_div_mul_cancel
File: Mathlib/Algebra/EuclideanDomain/Basic.lean

tactic: by_cases hc : c = 0
state_before: R : Type u
inst✝ : EuclideanDomain R
a b c : R
ha : a ≠ 0
hcb : c ∣ b
⊢ a * b / (a * c) = b / c
state_after: case pos
R : Type u
inst✝ : EuclideanDomain R
a b c : R
ha : a ≠ 0
hcb : c ∣ b
hc : c = 0
⊢ a * b / (a * c) = b / c

case neg
R : Type u
inst✝ : EuclideanDomain R
a b c : R
ha : a ≠ 0
hcb : c ∣ b
hc : ¬c = 0
⊢ a * b / (a * c) = b / c

tactic: refine eq_div_of_mul_eq_right hc (mul_left_cancel₀ ha ?_)
state_before: case neg
R : Type u
inst✝ : EuclideanDomain R
a b c : R
ha : a ≠ 0
hcb : c ∣ b
hc : ¬c = 0
⊢ a * b / (a * c) = b / c
state_after: case neg
R : Type u
inst✝ : EuclideanDomain R
a b c : R
ha : a ≠ 0
hcb : c ∣ b
hc : ¬c = 0
⊢ a * (c * (a * b / (a * c))) = a * b

tactic: rw [← mul_assoc, ← mul_div_assoc _ (mul_dvd_mul_left a hcb),
  mul_div_cancel_left₀ _ (mul_ne_zero ha hc)]
state_before: case neg
R : Type u
inst✝ : EuclideanDomain R
a b c : R
ha : a ≠ 0
hcb : c ∣ b
hc : ¬c = 0
⊢ a * (c * (a * b / (a * c))) = a * b
state_after: no goals

tactic: simp [hc]
state_before: case pos
R : Type u
inst✝ : EuclideanDomain R
a b c : R
ha : a ≠ 0
hcb : c ∣ b
hc : c = 0
⊢ a * b / (a * c) = b / c
state_after: no goals