1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Finset.covBy_iff_card_sdiff_eq_one
File: Mathlib/Data/Finset/Grade.lean

tactic: rw [covBy_iff_exists_insert]
state_before: α : Type u_1
s t : Finset α
a : α
inst✝ : DecidableEq α
⊢ t ⋖ s ↔ t ⊆ s ∧ (s \ t).card = 1
state_after: α : Type u_1
s t : Finset α
a : α
inst✝ : DecidableEq α
⊢ (∃ a ∉ t, insert a t = s) ↔ t ⊆ s ∧ (s \ t).card = 1

tactic: constructor
state_before: α : Type u_1
s t : Finset α
a : α
inst✝ : DecidableEq α
⊢ (∃ a ∉ t, insert a t = s) ↔ t ⊆ s ∧ (s \ t).card = 1
state_after: case mp
α : Type u_1
s t : Finset α
a : α
inst✝ : DecidableEq α
⊢ (∃ a ∉ t, insert a t = s) → t ⊆ s ∧ (s \ t).card = 1

case mpr
α : Type u_1
s t : Finset α
a : α
inst✝ : DecidableEq α
⊢ t ⊆ s ∧ (s \ t).card = 1 → ∃ a ∉ t, insert a t = s

tactic: rintro ⟨a, ha, rfl⟩
state_before: case mp
α : Type u_1
s t : Finset α
a : α
inst✝ : DecidableEq α
⊢ (∃ a ∉ t, insert a t = s) → t ⊆ s ∧ (s \ t).card = 1
state_after: case mp.intro.intro
α : Type u_1
t : Finset α
a✝ : α
inst✝ : DecidableEq α
a : α
ha : a ∉ t
⊢ t ⊆ insert a t ∧ (insert a t \ t).card = 1

tactic: simp [*]
state_before: case mp.intro.intro
α : Type u_1
t : Finset α
a✝ : α
inst✝ : DecidableEq α
a : α
ha : a ∉ t
⊢ t ⊆ insert a t ∧ (insert a t \ t).card = 1
state_after: no goals

tactic: simp_rw [card_eq_one]
state_before: case mpr
α : Type u_1
s t : Finset α
a : α
inst✝ : DecidableEq α
⊢ t ⊆ s ∧ (s \ t).card = 1 → ∃ a ∉ t, insert a t = s
state_after: case mpr
α : Type u_1
s t : Finset α
a : α
inst✝ : DecidableEq α
⊢ (t ⊆ s ∧ ∃ a, s \ t = {a}) → ∃ a ∉ t, insert a t = s

tactic: rintro ⟨hts, a, ha⟩
state_before: case mpr
α : Type u_1
s t : Finset α
a : α
inst✝ : DecidableEq α
⊢ (t ⊆ s ∧ ∃ a, s \ t = {a}) → ∃ a ∉ t, insert a t = s
state_after: case mpr.intro.intro
α : Type u_1
s t : Finset α
a✝ : α
inst✝ : DecidableEq α
hts : t ⊆ s
a : α
ha : s \ t = {a}
⊢ ∃ a ∉ t, insert a t = s

tactic: refine ⟨a, (mem_sdiff.1 <| superset_of_eq ha <| mem_singleton_self _).2, ?_⟩
state_before: case mpr.intro.intro
α : Type u_1
s t : Finset α
a✝ : α
inst✝ : DecidableEq α
hts : t ⊆ s
a : α
ha : s \ t = {a}
⊢ ∃ a ∉ t, insert a t = s
state_after: case mpr.intro.intro
α : Type u_1
s t : Finset α
a✝ : α
inst✝ : DecidableEq α
hts : t ⊆ s
a : α
ha : s \ t = {a}
⊢ insert a t = s

tactic: rw [insert_eq, ← ha, sdiff_union_of_subset hts]
state_before: case mpr.intro.intro
α : Type u_1
s t : Finset α
a✝ : α
inst✝ : DecidableEq α
hts : t ⊆ s
a : α
ha : s \ t = {a}
⊢ insert a t = s
state_after: no goals
Theorem: charZero_of_injective_ringHom
File: Mathlib/Algebra/CharP/Algebra.lean

tactic: simpa only [map_natCast f]
state_before: R : Type u_1
A : Type u_2
inst✝² : NonAssocSemiring R
inst✝¹ : NonAssocSemiring A
f : R →+* A
h : Function.Injective ⇑f
inst✝ : CharZero R
x✝² x✝¹ : ℕ
x✝ : ↑x✝² = ↑x✝¹
⊢ f ↑x✝² = f ↑x✝¹
state_after: no goals
Theorem: Nat.dvd_mul
File: Mathlib/Data/Nat/GCD/Basic.lean

tactic: constructor
state_before: x m n : ℕ
⊢ x ∣ m * n ↔ ∃ y z, y ∣ m ∧ z ∣ n ∧ y * z = x
state_after: case mp
x m n : ℕ
⊢ x ∣ m * n → ∃ y z, y ∣ m ∧ z ∣ n ∧ y * z = x

case mpr
x m n : ℕ
⊢ (∃ y z, y ∣ m ∧ z ∣ n ∧ y * z = x) → x ∣ m * n

tactic: intro h
state_before: case mp
x m n : ℕ
⊢ x ∣ m * n → ∃ y z, y ∣ m ∧ z ∣ n ∧ y * z = x
state_after: case mp
x m n : ℕ
h : x ∣ m * n
⊢ ∃ y z, y ∣ m ∧ z ∣ n ∧ y * z = x

tactic: obtain ⟨⟨⟨y, hy⟩, ⟨z, hz⟩⟩, rfl⟩ := prod_dvd_and_dvd_of_dvd_prod h
state_before: case mp
x m n : ℕ
h : x ∣ m * n
⊢ ∃ y z, y ∣ m ∧ z ∣ n ∧ y * z = x
state_after: case mp.mk.mk.mk.mk
m n y : ℕ
hy : y ∣ m
z : ℕ
hz : z ∣ n
h : ↑(⟨y, hy⟩, ⟨z, hz⟩).1 * ↑(⟨y, hy⟩, ⟨z, hz⟩).2 ∣ m * n
⊢ ∃ y_1 z_1, y_1 ∣ m ∧ z_1 ∣ n ∧ y_1 * z_1 = ↑(⟨y, hy⟩, ⟨z, hz⟩).1 * ↑(⟨y, hy⟩, ⟨z, hz⟩).2

tactic: exact ⟨y, z, hy, hz, rfl⟩
state_before: case mp.mk.mk.mk.mk
m n y : ℕ
hy : y ∣ m
z : ℕ
hz : z ∣ n
h : ↑(⟨y, hy⟩, ⟨z, hz⟩).1 * ↑(⟨y, hy⟩, ⟨z, hz⟩).2 ∣ m * n
⊢ ∃ y_1 z_1, y_1 ∣ m ∧ z_1 ∣ n ∧ y_1 * z_1 = ↑(⟨y, hy⟩, ⟨z, hz⟩).1 * ↑(⟨y, hy⟩, ⟨z, hz⟩).2
state_after: no goals

tactic: rintro ⟨y, z, hy, hz, rfl⟩
state_before: case mpr
x m n : ℕ
⊢ (∃ y z, y ∣ m ∧ z ∣ n ∧ y * z = x) → x ∣ m * n
state_after: case mpr.intro.intro.intro.intro
m n y z : ℕ
hy : y ∣ m
hz : z ∣ n
⊢ y * z ∣ m * n

tactic: exact mul_dvd_mul hy hz
state_before: case mpr.intro.intro.intro.intro
m n y z : ℕ
hy : y ∣ m
hz : z ∣ n
⊢ y * z ∣ m * n
state_after: no goals
Theorem: Ideal.bot_isMaximal
File: Mathlib/RingTheory/Ideal/Basic.lean

tactic: rw [← h]
state_before: α : Type u
β : Type v
K : Type u
inst✝ : DivisionSemiring K
I : Ideal K
h : ⊥ = ⊤
⊢ 1 ∉ ⊤
state_after: α : Type u
β : Type v
K : Type u
inst✝ : DivisionSemiring K
I : Ideal K
h : ⊥ = ⊤
⊢ 1 ∉ ⊥

tactic: simp
state_before: α : Type u
β : Type v
K : Type u
inst✝ : DivisionSemiring K
I : Ideal K
h : ⊥ = ⊤
⊢ 1 ∉ ⊥
state_after: no goals
Theorem: Polynomial.expand_char
File: Mathlib/Algebra/Polynomial/Expand.lean

tactic: refine f.induction_on' (fun a b ha hb => ?_) fun n a => ?_
state_before: R : Type u
inst✝² : CommSemiring R
S : Type v
inst✝¹ : CommSemiring S
p q : ℕ
inst✝ : ExpChar R p
f : R[X]
⊢ map (frobenius R p) ((expand R p) f) = f ^ p
state_after: case refine_1
R : Type u
inst✝² : CommSemiring R
S : Type v
inst✝¹ : CommSemiring S
p q : ℕ
inst✝ : ExpChar R p
f a b : R[X]
ha : map (frobenius R p) ((expand R p) a) = a ^ p
hb : map (frobenius R p) ((expand R p) b) = b ^ p
⊢ map (frobenius R p) ((expand R p) (a + b)) = (a + b) ^ p

case refine_2
R : Type u
inst✝² : CommSemiring R
S : Type v
inst✝¹ : CommSemiring S
p q : ℕ
inst✝ : ExpChar R p
f : R[X]
n : ℕ
a : R
⊢ map (frobenius R p) ((expand R p) ((monomial n) a)) = (monomial n) a ^ p

tactic: rw [AlgHom.map_add, Polynomial.map_add, ha, hb, add_pow_expChar]
state_before: case refine_1
R : Type u
inst✝² : CommSemiring R
S : Type v
inst✝¹ : CommSemiring S
p q : ℕ
inst✝ : ExpChar R p
f a b : R[X]
ha : map (frobenius R p) ((expand R p) a) = a ^ p
hb : map (frobenius R p) ((expand R p) b) = b ^ p
⊢ map (frobenius R p) ((expand R p) (a + b)) = (a + b) ^ p
state_after: no goals

tactic: rw [expand_monomial, map_monomial, ← C_mul_X_pow_eq_monomial, ← C_mul_X_pow_eq_monomial,
  mul_pow, ← C.map_pow, frobenius_def]
state_before: case refine_2
R : Type u
inst✝² : CommSemiring R
S : Type v
inst✝¹ : CommSemiring S
p q : ℕ
inst✝ : ExpChar R p
f : R[X]
n : ℕ
a : R
⊢ map (frobenius R p) ((expand R p) ((monomial n) a)) = (monomial n) a ^ p
state_after: case refine_2
R : Type u
inst✝² : CommSemiring R
S : Type v
inst✝¹ : CommSemiring S
p q : ℕ
inst✝ : ExpChar R p
f : R[X]
n : ℕ
a : R
⊢ C (a ^ p) * X ^ (n * p) = C (a ^ p) * (X ^ n) ^ p

tactic: ring
state_before: case refine_2
R : Type u
inst✝² : CommSemiring R
S : Type v
inst✝¹ : CommSemiring S
p q : ℕ
inst✝ : ExpChar R p
f : R[X]
n : ℕ
a : R
⊢ C (a ^ p) * X ^ (n * p) = C (a ^ p) * (X ^ n) ^ p
state_after: no goals
Theorem: himp_himp
File: Mathlib/Order/Heyting/Basic.lean

tactic: simp_rw [le_himp_iff, inf_assoc]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : GeneralizedHeytingAlgebra α
a✝ b✝ c✝ d✝ a b c d : α
⊢ d ≤ a ⇨ b ⇨ c ↔ d ≤ a ⊓ b ⇨ c
state_after: no goals
Theorem: Polynomial.coe_bit1
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: rw [bit1, bit1, coe_add, coe_one, coe_bit0]
state_before: σ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
φ ψ : R[X]
⊢ ↑(bit1 φ) = bit1 ↑φ
state_after: no goals
Theorem: Nat.mem_factors_mul
File: Mathlib/Data/Nat/Factors.lean

tactic: rw [mem_factors (mul_ne_zero ha hb), mem_factors ha, mem_factors hb, ← and_or_left]
state_before: a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
p : ℕ
⊢ p ∈ (a * b).factors ↔ p ∈ a.factors ∨ p ∈ b.factors
state_after: a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
p : ℕ
⊢ Prime p ∧ p ∣ a * b ↔ Prime p ∧ (p ∣ a ∨ p ∣ b)

tactic: simpa only [and_congr_right_iff] using Prime.dvd_mul
state_before: a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
p : ℕ
⊢ Prime p ∧ p ∣ a * b ↔ Prime p ∧ (p ∣ a ∨ p ∣ b)
state_after: no goals
Theorem: isPathConnected_singleton
File: Mathlib/Topology/Connected/PathConnected.lean

tactic: refine ⟨x, rfl, ?_⟩
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y z : X
ι : Type u_3
F : Set X
x : X
⊢ IsPathConnected {x}
state_after: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y z : X
ι : Type u_3
F : Set X
x : X
⊢ ∀ {y : X}, y ∈ {x} → JoinedIn {x} x y

tactic: rintro y rfl
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y z : X
ι : Type u_3
F : Set X
x : X
⊢ ∀ {y : X}, y ∈ {x} → JoinedIn {x} x y
state_after: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y✝ z : X
ι : Type u_3
F : Set X
y : X
⊢ JoinedIn {y} y y

tactic: exact JoinedIn.refl rfl
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y✝ z : X
ι : Type u_3
F : Set X
y : X
⊢ JoinedIn {y} y y
state_after: no goals
Theorem: PowerSeries.coeff_ne_zero_C
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: rw [coeff_C, if_neg h]
state_before: R : Type u_1
inst✝ : Semiring R
a : R
n : ℕ
h : n ≠ 0
⊢ (coeff R n) ((C R) a) = 0
state_after: no goals
Theorem: Polynomial.le_degree_of_ne_zero
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

tactic: exact Finset.le_sup (mem_support_iff.2 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.coeff n ≠ 0
⊢ ↑n ≤ p.degree
state_after: no goals
Theorem: Filter.tendsto_atTop_add_right_of_le'
File: Mathlib/Order/Filter/AtTopBot.lean

tactic: simp [hg]
state_before: ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝ : OrderedAddCommGroup β
l : Filter α
f g : α → β
C : β
hf : Tendsto f l atTop
hg : ∀ᶠ (x : α) in l, C ≤ g x
⊢ ∀ᶠ (x : α) in l, (fun x => -g x) x ≤ -C
state_after: no goals

tactic: simp [hf]
state_before: ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝ : OrderedAddCommGroup β
l : Filter α
f g : α → β
C : β
hf : Tendsto f l atTop
hg : ∀ᶠ (x : α) in l, C ≤ g x
⊢ Tendsto (fun x => (fun x => f x + g x) x + (fun x => -g x) x) l atTop
state_after: no goals
Theorem: Set.image2_def
File: Mathlib/Data/Set/Functor.lean

tactic: ext
state_before: α✝ β✝ : Type u
s✝ : Set α✝
f✝ : α✝ → Set β✝
g : Set (α✝ → β✝)
α β γ : Type u
f : α → β → γ
s : Set α
t : Set β
⊢ image2 f s t = Seq.seq (f <$> s) fun x => t
state_after: case h
α✝ β✝ : Type u
s✝ : Set α✝
f✝ : α✝ → Set β✝
g : Set (α✝ → β✝)
α β γ : Type u
f : α → β → γ
s : Set α
t : Set β
x✝ : γ
⊢ x✝ ∈ image2 f s t ↔ x✝ ∈ Seq.seq (f <$> s) fun x => t

tactic: simp
state_before: case h
α✝ β✝ : Type u
s✝ : Set α✝
f✝ : α✝ → Set β✝
g : Set (α✝ → β✝)
α β γ : Type u
f : α → β → γ
s : Set α
t : Set β
x✝ : γ
⊢ x✝ ∈ image2 f s t ↔ x✝ ∈ Seq.seq (f <$> s) fun x => t
state_after: no goals
Theorem: UniqueMul.mulHom_map_iff
File: Mathlib/Algebra/Group/UniqueProds.lean

tactic: classical simp_rw [← mulHom_image_iff ⟨f, mul⟩ f.2, Finset.map_eq_image]; rfl
state_before: G : Type u_1
H : Type u_2
inst✝¹ : Mul G
inst✝ : Mul H
A B : Finset G
a0 b0 : G
f : G ↪ H
mul : ∀ (x y : G), f (x * y) = f x * f y
⊢ UniqueMul (Finset.map f A) (Finset.map f B) (f a0) (f b0) ↔ UniqueMul A B a0 b0
state_after: no goals

tactic: simp_rw [← mulHom_image_iff ⟨f, mul⟩ f.2, Finset.map_eq_image]
state_before: G : Type u_1
H : Type u_2
inst✝¹ : Mul G
inst✝ : Mul H
A B : Finset G
a0 b0 : G
f : G ↪ H
mul : ∀ (x y : G), f (x * y) = f x * f y
⊢ UniqueMul (Finset.map f A) (Finset.map f B) (f a0) (f b0) ↔ UniqueMul A B a0 b0
state_after: G : Type u_1
H : Type u_2
inst✝¹ : Mul G
inst✝ : Mul H
A B : Finset G
a0 b0 : G
f : G ↪ H
mul : ∀ (x y : G), f (x * y) = f x * f y
⊢ UniqueMul (Finset.image (⇑f) A) (Finset.image (⇑f) B) (f a0) (f b0) ↔
    UniqueMul (Finset.image (⇑{ toFun := ⇑f, map_mul' := mul }) A) (Finset.image (⇑{ toFun := ⇑f, map_mul' := mul }) B)
      ({ toFun := ⇑f, map_mul' := mul } a0) ({ toFun := ⇑f, map_mul' := mul } b0)

tactic: rfl
state_before: G : Type u_1
H : Type u_2
inst✝¹ : Mul G
inst✝ : Mul H
A B : Finset G
a0 b0 : G
f : G ↪ H
mul : ∀ (x y : G), f (x * y) = f x * f y
⊢ UniqueMul (Finset.image (⇑f) A) (Finset.image (⇑f) B) (f a0) (f b0) ↔
    UniqueMul (Finset.image (⇑{ toFun := ⇑f, map_mul' := mul }) A) (Finset.image (⇑{ toFun := ⇑f, map_mul' := mul }) B)
      ({ toFun := ⇑f, map_mul' := mul } a0) ({ toFun := ⇑f, map_mul' := mul } b0)
state_after: no goals
Theorem: Real.nnnorm_rpow_of_nonneg
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

tactic: ext
state_before: w x✝ y✝ z x y : ℝ
hx : 0 ≤ x
⊢ ‖x ^ y‖₊ = ‖x‖₊ ^ y
state_after: case a
w x✝ y✝ z x y : ℝ
hx : 0 ≤ x
⊢ ↑‖x ^ y‖₊ = ↑(‖x‖₊ ^ y)

tactic: exact Real.norm_rpow_of_nonneg hx
state_before: case a
w x✝ y✝ z x y : ℝ
hx : 0 ≤ x
⊢ ↑‖x ^ y‖₊ = ↑(‖x‖₊ ^ y)
state_after: no goals
Theorem: ENorm.map_zero
File: Mathlib/Analysis/NormedSpace/ENorm.lean

tactic: rw [← zero_smul 𝕜 (0 : V), e.map_smul]
state_before: 𝕜 : Type u_1
V : Type u_2
inst✝² : NormedField 𝕜
inst✝¹ : AddCommGroup V
inst✝ : Module 𝕜 V
e : ENorm 𝕜 V
⊢ ↑e 0 = 0
state_after: 𝕜 : Type u_1
V : Type u_2
inst✝² : NormedField 𝕜
inst✝¹ : AddCommGroup V
inst✝ : Module 𝕜 V
e : ENorm 𝕜 V
⊢ ↑‖0‖₊ * ↑e 0 = 0

tactic: norm_num
state_before: 𝕜 : Type u_1
V : Type u_2
inst✝² : NormedField 𝕜
inst✝¹ : AddCommGroup V
inst✝ : Module 𝕜 V
e : ENorm 𝕜 V
⊢ ↑‖0‖₊ * ↑e 0 = 0
state_after: no goals
Theorem: SemiconjBy.conj_mk
File: Mathlib/Algebra/Group/Semiconj/Defs.lean

tactic: unfold SemiconjBy
state_before: S : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Group G
a✝ x✝ y a x : G
⊢ SemiconjBy a x (a * x * a⁻¹)
state_after: S : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Group G
a✝ x✝ y a x : G
⊢ a * x = a * x * a⁻¹ * a

tactic: rw [mul_assoc, inv_mul_self, mul_one]
state_before: S : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Group G
a✝ x✝ y a x : G
⊢ a * x = a * x * a⁻¹ * a
state_after: no goals
Theorem: Real.sqrt_eq_zero_of_nonpos
File: Mathlib/Data/Real/Sqrt.lean

tactic: simp [sqrt, Real.toNNReal_eq_zero.2 h]
state_before: x y : ℝ
h : x ≤ 0
⊢ √x = 0
state_after: no goals
Theorem: le_of_smul_le_smul_of_neg
File: Mathlib/Algebra/Order/Module/Defs.lean

tactic: rw [← neg_neg a, neg_smul, neg_smul (-a), neg_le_neg_iff] at h
state_before: α : Type u_1
β : Type u_2
a a₁ a₂ : α
b b₁ b₂ : β
inst✝³ : OrderedRing α
inst✝² : OrderedAddCommGroup β
inst✝¹ : Module α β
inst✝ : PosSMulReflectLE α β
h : a • b₁ ≤ a • b₂
ha : a < 0
⊢ b₂ ≤ b₁
state_after: α : Type u_1
β : Type u_2
a a₁ a₂ : α
b b₁ b₂ : β
inst✝³ : OrderedRing α
inst✝² : OrderedAddCommGroup β
inst✝¹ : Module α β
inst✝ : PosSMulReflectLE α β
h : -a • b₂ ≤ -a • b₁
ha : a < 0
⊢ b₂ ≤ b₁

tactic: exact le_of_smul_le_smul_of_pos_left h <| neg_pos.2 ha
state_before: α : Type u_1
β : Type u_2
a a₁ a₂ : α
b b₁ b₂ : β
inst✝³ : OrderedRing α
inst✝² : OrderedAddCommGroup β
inst✝¹ : Module α β
inst✝ : PosSMulReflectLE α β
h : -a • b₂ ≤ -a • b₁
ha : a < 0
⊢ b₂ ≤ b₁
state_after: no goals
Theorem: Set.ncard_diff
File: Mathlib/Data/Set/Card.lean

tactic: rw [← ncard_diff_add_ncard_of_subset h ht, add_tsub_cancel_right]
state_before: α : Type u_1
β : Type u_2
s t : Set α
f : α → β
h : s ⊆ t
ht : autoParam t.Finite _auto✝
⊢ (t \ s).ncard = t.ncard - s.ncard
state_after: no goals
Theorem: Real.Angle.coe_pi_add_coe_pi
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: rw [← two_nsmul, two_nsmul_coe_pi]
state_before: ⊢ ↑π + ↑π = 0
state_after: no goals
Theorem: ContinuousLinearMap.opNNNorm_le_of_unit_nnnorm
File: Mathlib/Analysis/NormedSpace/OperatorNorm/NNNorm.lean

tactic: rwa [← NNReal.coe_eq_one]
state_before: 𝕜 : Type u_1
𝕜₂ : Type u_2
𝕜₃ : Type u_3
E : Type u_4
Eₗ : Type u_5
F : Type u_6
Fₗ : Type u_7
G : Type u_8
Gₗ : Type u_9
𝓕 : Type u_10
inst✝²⁰ : SeminormedAddCommGroup E
inst✝¹⁹ : SeminormedAddCommGroup Eₗ
inst✝¹⁸ : SeminormedAddCommGroup F
inst✝¹⁷ : SeminormedAddCommGroup Fₗ
inst✝¹⁶ : SeminormedAddCommGroup G
inst✝¹⁵ : SeminormedAddCommGroup Gₗ
inst✝¹⁴ : NontriviallyNormedField 𝕜
inst✝¹³ : NontriviallyNormedField 𝕜₂
inst✝¹² : NontriviallyNormedField 𝕜₃
inst✝¹¹ : NormedSpace 𝕜 E
inst✝¹⁰ : NormedSpace 𝕜 Eₗ
inst✝⁹ : NormedSpace 𝕜₂ F
inst✝⁸ : NormedSpace 𝕜 Fₗ
inst✝⁷ : NormedSpace 𝕜₃ G
inst✝⁶ : NormedSpace 𝕜 Gₗ
σ₁₂ : 𝕜 →+* 𝕜₂
σ₂₃ : 𝕜₂ →+* 𝕜₃
σ₁₃ : 𝕜 →+* 𝕜₃
inst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
inst✝⁴ : FunLike 𝓕 E F
inst✝³ : RingHomIsometric σ₁₂
inst✝² : RingHomIsometric σ₂₃
f✝ g : E →SL[σ₁₂] F
h : F →SL[σ₂₃] G
x✝ : E
inst✝¹ : NormedSpace ℝ E
inst✝ : NormedSpace ℝ F
f : E →L[ℝ] F
C : ℝ≥0
hf : ∀ (x : E), ‖x‖₊ = 1 → ‖f x‖₊ ≤ C
x : E
hx : ‖x‖ = 1
⊢ ‖x‖₊ = 1
state_after: no goals
Theorem: Matroid.map_id
File: Mathlib/Data/Matroid/Map.lean

tactic: simp [eq_iff_indep_iff_indep_forall]
state_before: α : Type u_1
β : Type u_2
f : α → β
E I s : Set α
M : Matroid α
N : Matroid β
⊢ M.map id ⋯ = M
state_after: no goals
Theorem: Vector.reverse_snoc
File: Mathlib/Data/Vector/Snoc.lean

tactic: cases xs
state_before: α : Type u_1
n : ℕ
xs : Vector α n
x : α
⊢ (xs.snoc x).reverse = x ::ᵥ xs.reverse
state_after: case mk
α : Type u_1
n : ℕ
x : α
val✝ : List α
property✝ : val✝.length = n
⊢ (snoc ⟨val✝, property✝⟩ x).reverse = x ::ᵥ reverse ⟨val✝, property✝⟩

tactic: simp only [reverse, snoc, cons, toList_mk]
state_before: case mk
α : Type u_1
n : ℕ
x : α
val✝ : List α
property✝ : val✝.length = n
⊢ (snoc ⟨val✝, property✝⟩ x).reverse = x ::ᵥ reverse ⟨val✝, property✝⟩
state_after: case mk
α : Type u_1
n : ℕ
x : α
val✝ : List α
property✝ : val✝.length = n
⊢ ⟨(append ⟨val✝, property✝⟩ ⟨[x], ⋯⟩).toList.reverse, ⋯⟩ = ⟨x :: val✝.reverse, ⋯⟩

tactic: congr
state_before: case mk
α : Type u_1
n : ℕ
x : α
val✝ : List α
property✝ : val✝.length = n
⊢ ⟨(append ⟨val✝, property✝⟩ ⟨[x], ⋯⟩).toList.reverse, ⋯⟩ = ⟨x :: val✝.reverse, ⋯⟩
state_after: case mk.e_val
α : Type u_1
n : ℕ
x : α
val✝ : List α
property✝ : val✝.length = n
⊢ (append ⟨val✝, property✝⟩ ⟨[x], ⋯⟩).toList.reverse = x :: val✝.reverse

tactic: simp [toList, Vector.append, Append.append]
state_before: case mk.e_val
α : Type u_1
n : ℕ
x : α
val✝ : List α
property✝ : val✝.length = n
⊢ (append ⟨val✝, property✝⟩ ⟨[x], ⋯⟩).toList.reverse = x :: val✝.reverse
state_after: no goals
Theorem: PNat.div_coe
File: Mathlib/Data/PNat/Defs.lean

tactic: dsimp [div, modDiv]
state_before: m k : ℕ+
⊢ m.div k = if ↑m % ↑k = 0 then (↑m / ↑k).pred else ↑m / ↑k
state_after: m k : ℕ+
⊢ (k.modDivAux (↑m % ↑k) (↑m / ↑k)).2 = if ↑m % ↑k = 0 then ↑m / ↑k - 1 else ↑m / ↑k

tactic: cases (m : ℕ) % (k : ℕ) with
| zero =>
  rw [if_pos rfl]
  rfl
| succ n =>
  rw [if_neg n.succ_ne_zero]
  rfl
state_before: m k : ℕ+
⊢ (k.modDivAux (↑m % ↑k) (↑m / ↑k)).2 = if ↑m % ↑k = 0 then ↑m / ↑k - 1 else ↑m / ↑k
state_after: no goals

tactic: rw [if_pos rfl]
state_before: case zero
m k : ℕ+
⊢ (k.modDivAux 0 (↑m / ↑k)).2 = if 0 = 0 then ↑m / ↑k - 1 else ↑m / ↑k
state_after: case zero
m k : ℕ+
⊢ (k.modDivAux 0 (↑m / ↑k)).2 = ↑m / ↑k - 1

tactic: rfl
state_before: case zero
m k : ℕ+
⊢ (k.modDivAux 0 (↑m / ↑k)).2 = ↑m / ↑k - 1
state_after: no goals

tactic: rw [if_neg n.succ_ne_zero]
state_before: case succ
m k : ℕ+
n : ℕ
⊢ (k.modDivAux (n + 1) (↑m / ↑k)).2 = if n + 1 = 0 then ↑m / ↑k - 1 else ↑m / ↑k
state_after: case succ
m k : ℕ+
n : ℕ
⊢ (k.modDivAux (n + 1) (↑m / ↑k)).2 = ↑m / ↑k

tactic: rfl
state_before: case succ
m k : ℕ+
n : ℕ
⊢ (k.modDivAux (n + 1) (↑m / ↑k)).2 = ↑m / ↑k
state_after: no goals
Theorem: Polynomial.natDegree_sub
File: Mathlib/Algebra/Polynomial/Degree/Lemmas.lean

tactic: rw [← natDegree_neg, neg_sub]
state_before: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝ : Ring R
p q : R[X]
⊢ (p - q).natDegree = (q - p).natDegree
state_after: no goals
Theorem: List.kerase_comm
File: Mathlib/Data/List/Sigma.lean

tactic: simp [h]
state_before: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a₁ a₂ : α
l : List (Sigma β)
h : a₁ = a₂
⊢ kerase a₂ (kerase a₁ l) = kerase a₁ (kerase a₂ l)
state_after: no goals

tactic: simp [kerase_append_left h',
  kerase_append_right (mt (mem_keys_kerase_of_ne h).mp a₁_nin_l₁)]
state_before: α : Type u
β : α → Type v
l✝ l₁✝ l₂✝ : List (Sigma β)
inst✝ : DecidableEq α
a₁ a₂ : α
l : List (Sigma β)
h : ¬a₁ = a₂
ha₂ : a₂ ∈ l.keys
b₁ : β a₁
l₁ l₂ : List (Sigma β)
a₁_nin_l₁ : a₁ ∉ l₁.keys
x✝ : a₂ ∈ (l₁ ++ ⟨a₁, b₁⟩ :: l₂).keys
ha₁ : a₁ ∈ (l₁ ++ ⟨a₁, b₁⟩ :: l₂).keys
h' : a₂ ∈ l₁.keys
⊢ kerase a₂ (l₁ ++ l₂) = kerase a₁ (kerase a₂ (l₁ ++ ⟨a₁, b₁⟩ :: l₂))
state_after: no goals

tactic: simp [kerase_append_right h', kerase_append_right a₁_nin_l₁,
  @kerase_cons_ne _ _ _ a₂ ⟨a₁, b₁⟩ _ (Ne.symm h)]
state_before: α : Type u
β : α → Type v
l✝ l₁✝ l₂✝ : List (Sigma β)
inst✝ : DecidableEq α
a₁ a₂ : α
l : List (Sigma β)
h : ¬a₁ = a₂
ha₂ : a₂ ∈ l.keys
b₁ : β a₁
l₁ l₂ : List (Sigma β)
a₁_nin_l₁ : a₁ ∉ l₁.keys
x✝ : a₂ ∈ (l₁ ++ ⟨a₁, b₁⟩ :: l₂).keys
ha₁ : a₁ ∈ (l₁ ++ ⟨a₁, b₁⟩ :: l₂).keys
h' : a₂ ∉ l₁.keys
⊢ kerase a₂ (l₁ ++ l₂) = kerase a₁ (kerase a₂ (l₁ ++ ⟨a₁, b₁⟩ :: l₂))
state_after: no goals

tactic: simp [ha₂, mt mem_keys_of_mem_keys_kerase ha₂]
state_before: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a₁ a₂ : α
l : List (Sigma β)
h : ¬a₁ = a₂
ha₁ : a₁ ∈ l.keys
ha₂ : a₂ ∉ l.keys
⊢ kerase a₂ (kerase a₁ l) = kerase a₁ (kerase a₂ l)
state_after: no goals

tactic: simp [ha₁, mt mem_keys_of_mem_keys_kerase ha₁]
state_before: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a₁ a₂ : α
l : List (Sigma β)
h : ¬a₁ = a₂
ha₁ : a₁ ∉ l.keys
⊢ kerase a₂ (kerase a₁ l) = kerase a₁ (kerase a₂ l)
state_after: no goals
Theorem: Function.minimalPeriod_eq_one_iff_isFixedPt
File: Mathlib/Dynamics/PeriodicPts.lean

tactic: refine ⟨fun h => ?_, fun h => ?_⟩
state_before: α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
⊢ minimalPeriod f x = 1 ↔ IsFixedPt f x
state_after: case refine_1
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : minimalPeriod f x = 1
⊢ IsFixedPt f x

case refine_2
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : IsFixedPt f x
⊢ minimalPeriod f x = 1

tactic: rw [← iterate_one f]
state_before: case refine_1
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : minimalPeriod f x = 1
⊢ IsFixedPt f x
state_after: case refine_1
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : minimalPeriod f x = 1
⊢ IsFixedPt f^[1] x

tactic: refine Function.IsPeriodicPt.isFixedPt ?_
state_before: case refine_1
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : minimalPeriod f x = 1
⊢ IsFixedPt f^[1] x
state_after: case refine_1
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : minimalPeriod f x = 1
⊢ IsPeriodicPt f 1 x

tactic: rw [← h]
state_before: case refine_1
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : minimalPeriod f x = 1
⊢ IsPeriodicPt f 1 x
state_after: case refine_1
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : minimalPeriod f x = 1
⊢ IsPeriodicPt f (minimalPeriod f x) x

tactic: exact isPeriodicPt_minimalPeriod f x
state_before: case refine_1
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : minimalPeriod f x = 1
⊢ IsPeriodicPt f (minimalPeriod f x) x
state_after: no goals

tactic: exact
  ((h.isPeriodicPt 1).minimalPeriod_le Nat.one_pos).antisymm
    (Nat.succ_le_of_lt ((h.isPeriodicPt 1).minimalPeriod_pos Nat.one_pos))
state_before: case refine_2
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : IsFixedPt f x
⊢ minimalPeriod f x = 1
state_after: no goals