1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: NNRat.inv_def
File: Mathlib/Algebra/Order/Field/Rat.lean

tactic: ext
state_before: q : ℚ≥0
⊢ q⁻¹ = divNat q.den q.num
state_after: case a
q : ℚ≥0
⊢ ↑q⁻¹ = ↑(divNat q.den q.num)

tactic: simp [Rat.inv_def', num_coe, den_coe]
state_before: case a
q : ℚ≥0
⊢ ↑q⁻¹ = ↑(divNat q.den q.num)
state_after: no goals
Theorem: mul_eq_mul_right_iff
File: Mathlib/Algebra/GroupWithZero/Basic.lean

tactic: by_cases hc : c = 0 <;> [simp only [hc, mul_zero, or_true]; simp [mul_left_inj', hc]]
state_before: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝ : CancelMonoidWithZero M₀
a b c : M₀
⊢ a * c = b * c ↔ a = b ∨ c = 0
state_after: no goals
Theorem: String.modify_of_valid
File: .lake/packages/batteries/Batteries/Data/String/Lemmas.lean

tactic: rw [modify, set_of_valid, get_of_valid]
state_before: f : Char → Char
cs cs' : List Char
⊢ { data := cs ++ cs' }.modify { byteIdx := utf8Len cs } f = { data := cs ++ List.modifyHead f cs' }
state_after: f : Char → Char
cs cs' : List Char
⊢ { data := cs ++ List.modifyHead (fun x => f (cs'.headD default)) cs' } = { data := cs ++ List.modifyHead f cs' }

tactic: cases cs' <;> rfl
state_before: f : Char → Char
cs cs' : List Char
⊢ { data := cs ++ List.modifyHead (fun x => f (cs'.headD default)) cs' } = { data := cs ++ List.modifyHead f cs' }
state_after: no goals
Theorem: unary_relation_sSup_iff
File: Mathlib/Order/CompleteLattice.lean

tactic: rw [sSup_apply]
state_before: α✝ : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
α : Type u_9
s : Set (α → Prop)
a : α
⊢ sSup s a ↔ ∃ r ∈ s, r a
state_after: α✝ : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
α : Type u_9
s : Set (α → Prop)
a : α
⊢ ⨆ f, ↑f a ↔ ∃ r ∈ s, r a

tactic: simp [← eq_iff_iff]
state_before: α✝ : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
α : Type u_9
s : Set (α → Prop)
a : α
⊢ ⨆ f, ↑f a ↔ ∃ r ∈ s, r a
state_after: no goals
Theorem: CategoryTheory.SimplicialObject.δ_comp_δ''
File: Mathlib/AlgebraicTopology/SimplicialObject.lean

tactic: dsimp [δ]
state_before: C : Type u
inst✝ : Category.{v, u} C
X : SimplicialObject C
n : ℕ
i : Fin (n + 3)
j : Fin (n + 2)
H : i ≤ j.castSucc
⊢ X.δ j.succ ≫ X.δ (i.castLT ⋯) = X.δ i ≫ X.δ j
state_after: C : Type u
inst✝ : Category.{v, u} C
X : SimplicialObject C
n : ℕ
i : Fin (n + 3)
j : Fin (n + 2)
H : i ≤ j.castSucc
⊢ X.map (SimplexCategory.δ j.succ).op ≫ X.map (SimplexCategory.δ (i.castLT ⋯)).op =
    X.map (SimplexCategory.δ i).op ≫ X.map (SimplexCategory.δ j).op

tactic: simp only [← X.map_comp, ← op_comp, SimplexCategory.δ_comp_δ'' H]
state_before: C : Type u
inst✝ : Category.{v, u} C
X : SimplicialObject C
n : ℕ
i : Fin (n + 3)
j : Fin (n + 2)
H : i ≤ j.castSucc
⊢ X.map (SimplexCategory.δ j.succ).op ≫ X.map (SimplexCategory.δ (i.castLT ⋯)).op =
    X.map (SimplexCategory.δ i).op ≫ X.map (SimplexCategory.δ j).op
state_after: no goals
Theorem: ZMod.val_mul_le
File: Mathlib/Data/ZMod/Basic.lean

tactic: rw [val_mul]
state_before: n : ℕ
a b : ZMod n
⊢ (a * b).val ≤ a.val * b.val
state_after: n : ℕ
a b : ZMod n
⊢ a.val * b.val % n ≤ a.val * b.val

tactic: apply Nat.mod_le
state_before: n : ℕ
a b : ZMod n
⊢ a.val * b.val % n ≤ a.val * b.val
state_after: no goals
Theorem: CategoryTheory.MorphismProperty.LeftFraction.Localization.Hom.mk_surjective
File: Mathlib/CategoryTheory/Localization/CalculusOfFractions.lean

tactic: obtain ⟨z⟩ := f
state_before: C : Type u_1
D : Type u_2
inst✝² : Category.{u_3, u_1} C
inst✝¹ : Category.{?u.31636, u_2} D
W : MorphismProperty C
inst✝ : W.HasLeftCalculusOfFractions
X Y : C
f : Hom W X Y
⊢ ∃ z, f = mk z
state_after: case mk
C : Type u_1
D : Type u_2
inst✝² : Category.{u_3, u_1} C
inst✝¹ : Category.{?u.31636, u_2} D
W : MorphismProperty C
inst✝ : W.HasLeftCalculusOfFractions
X Y : C
f : Hom W X Y
z : W.LeftFraction X Y
⊢ ∃ z_1, Quot.mk LeftFractionRel z = mk z_1

tactic: exact ⟨z, rfl⟩
state_before: case mk
C : Type u_1
D : Type u_2
inst✝² : Category.{u_3, u_1} C
inst✝¹ : Category.{?u.31636, u_2} D
W : MorphismProperty C
inst✝ : W.HasLeftCalculusOfFractions
X Y : C
f : Hom W X Y
z : W.LeftFraction X Y
⊢ ∃ z_1, Quot.mk LeftFractionRel z = mk z_1
state_after: no goals
Theorem: Set.inv_op_smul_set_distrib₀
File: Mathlib/Data/Set/Pointwise/SMul.lean

tactic: obtain rfl | ha := eq_or_ne a 0
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : GroupWithZero α
inst✝ : MulAction α β
s✝ t : Set β
a✝ a : α
s : Set α
⊢ (op a • s)⁻¹ = a⁻¹ • s⁻¹
state_after: case inl
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : GroupWithZero α
inst✝ : MulAction α β
s✝ t : Set β
a : α
s : Set α
⊢ (op 0 • s)⁻¹ = 0⁻¹ • s⁻¹

case inr
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : GroupWithZero α
inst✝ : MulAction α β
s✝ t : Set β
a✝ a : α
s : Set α
ha : a ≠ 0
⊢ (op a • s)⁻¹ = a⁻¹ • s⁻¹

tactic: obtain rfl | hs := s.eq_empty_or_nonempty <;> simp [*]
state_before: case inl
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : GroupWithZero α
inst✝ : MulAction α β
s✝ t : Set β
a : α
s : Set α
⊢ (op 0 • s)⁻¹ = 0⁻¹ • s⁻¹
state_after: no goals

tactic: ext
state_before: case inr
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : GroupWithZero α
inst✝ : MulAction α β
s✝ t : Set β
a✝ a : α
s : Set α
ha : a ≠ 0
⊢ (op a • s)⁻¹ = a⁻¹ • s⁻¹
state_after: case inr.h
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : GroupWithZero α
inst✝ : MulAction α β
s✝ t : Set β
a✝ a : α
s : Set α
ha : a ≠ 0
x✝ : α
⊢ x✝ ∈ (op a • s)⁻¹ ↔ x✝ ∈ a⁻¹ • s⁻¹

tactic: simp [mem_smul_set_iff_inv_smul_mem₀, *]
state_before: case inr.h
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : GroupWithZero α
inst✝ : MulAction α β
s✝ t : Set β
a✝ a : α
s : Set α
ha : a ≠ 0
x✝ : α
⊢ x✝ ∈ (op a • s)⁻¹ ↔ x✝ ∈ a⁻¹ • s⁻¹
state_after: no goals
Theorem: GaloisConnection.compl
File: Mathlib/Order/GaloisConnection.lean

tactic: dsimp
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
κ : ι → Sort u_1
a✝ a₁ a₂ : α
b✝ b₁ b₂ : β
inst✝¹ : BooleanAlgebra α
inst✝ : BooleanAlgebra β
l : α → β
u : β → α
gc : GaloisConnection l u
a : β
b : α
⊢ (compl ∘ u ∘ compl) a ≤ b ↔ a ≤ (compl ∘ l ∘ compl) b
state_after: α : Type u
β : Type v
γ : Type w
ι : Sort x
κ : ι → Sort u_1
a✝ a₁ a₂ : α
b✝ b₁ b₂ : β
inst✝¹ : BooleanAlgebra α
inst✝ : BooleanAlgebra β
l : α → β
u : β → α
gc : GaloisConnection l u
a : β
b : α
⊢ (u aᶜ)ᶜ ≤ b ↔ a ≤ (l bᶜ)ᶜ

tactic: rw [le_compl_iff_le_compl, gc, compl_le_iff_compl_le]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
κ : ι → Sort u_1
a✝ a₁ a₂ : α
b✝ b₁ b₂ : β
inst✝¹ : BooleanAlgebra α
inst✝ : BooleanAlgebra β
l : α → β
u : β → α
gc : GaloisConnection l u
a : β
b : α
⊢ (u aᶜ)ᶜ ≤ b ↔ a ≤ (l bᶜ)ᶜ
state_after: no goals
Theorem: SimpleGraph.Subgraph.edgeSet_inf
File: Mathlib/Combinatorics/SimpleGraph/Subgraph.lean

tactic: simp
state_before: ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : G.Subgraph
a b : V
H₁ H₂ : G.Subgraph
⊢ ∀ (x y : V), s(x, y) ∈ (H₁ ⊓ H₂).edgeSet ↔ s(x, y) ∈ H₁.edgeSet ∩ H₂.edgeSet
state_after: no goals
Theorem: continuous_iInf_rng
File: Mathlib/Topology/Order.lean

tactic: simp only [continuous_iff_coinduced_le, le_iInf_iff]
state_before: α : Type u
β : Type v
γ : Type u_1
f : α → β
ι : Sort u_2
t₁ : TopologicalSpace α
t₂ : ι → TopologicalSpace β
⊢ Continuous f ↔ ∀ (i : ι), Continuous f
state_after: no goals
Theorem: List.reverse_cons'
File: Mathlib/Data/List/Basic.lean

tactic: simp only [reverse_cons, concat_eq_append]
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
a : α
l : List α
⊢ (a :: l).reverse = l.reverse.concat a
state_after: no goals
Theorem: Polynomial.Monic.of_mul_monic_right
File: Mathlib/Algebra/Polynomial/Monic.lean

tactic: contrapose! hpq
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hq : q.Monic
hpq : (p * q).Monic
⊢ p.Monic
state_after: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hq : q.Monic
hpq : ¬p.Monic
⊢ ¬(p * q).Monic

tactic: rw [Monic.def] at hpq ⊢
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hq : q.Monic
hpq : ¬p.Monic
⊢ ¬(p * q).Monic
state_after: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hq : q.Monic
hpq : ¬p.leadingCoeff = 1
⊢ ¬(p * q).leadingCoeff = 1

tactic: rwa [leadingCoeff_mul_monic hq]
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hq : q.Monic
hpq : ¬p.leadingCoeff = 1
⊢ ¬(p * q).leadingCoeff = 1
state_after: no goals
Theorem: Set.disjoint_right
File: Mathlib/Data/Set/Basic.lean

tactic: rw [disjoint_comm, disjoint_left]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t t₁ t₂ u : Set α
⊢ Disjoint s t ↔ ∀ ⦃a : α⦄, a ∈ t → a ∉ s
state_after: no goals
Theorem: Mathlib.Meta.Positivity.log_pos_of_isNat
File: Mathlib/Analysis/SpecialFunctions/Log/Basic.lean

tactic: rw [NormNum.IsNat.to_eq h rfl]
state_before: e : ℝ
d n : ℕ
h : NormNum.IsNat e n
w : Nat.blt 1 n = true
⊢ 0 < Real.log e
state_after: e : ℝ
d n : ℕ
h : NormNum.IsNat e n
w : Nat.blt 1 n = true
⊢ 0 < Real.log ↑n

tactic: apply Real.log_pos
state_before: e : ℝ
d n : ℕ
h : NormNum.IsNat e n
w : Nat.blt 1 n = true
⊢ 0 < Real.log ↑n
state_after: case hx
e : ℝ
d n : ℕ
h : NormNum.IsNat e n
w : Nat.blt 1 n = true
⊢ 1 < ↑n

tactic: simpa using w
state_before: case hx
e : ℝ
d n : ℕ
h : NormNum.IsNat e n
w : Nat.blt 1 n = true
⊢ 1 < ↑n
state_after: no goals
Theorem: Irrational.of_mul_int
File: Mathlib/Data/Real/Irrational.lean

tactic: rwa [cast_intCast]
state_before: q : ℚ
x y : ℝ
m : ℤ
h : Irrational (x * ↑m)
⊢ Irrational (x * ↑↑m)
state_after: no goals
Theorem: ValuationSubring.valuation_eq_one_iff
File: Mathlib/RingTheory/Valuation/ValuationSubring.lean

tactic: have ha : (a : K) ≠ 0 := by
  intro c
  rw [c, A.valuation.map_zero] at h
  exact zero_ne_one h
state_before: K : Type u
inst✝ : Field K
A : ValuationSubring K
a : ↥A
h : A.valuation ↑a = 1
⊢ IsUnit a
state_after: K : Type u
inst✝ : Field K
A : ValuationSubring K
a : ↥A
h : A.valuation ↑a = 1
ha : ↑a ≠ 0
⊢ IsUnit a

tactic: have ha' : (a : K)⁻¹ ∈ A := by rw [← valuation_le_one_iff, map_inv₀, h, inv_one]
state_before: K : Type u
inst✝ : Field K
A : ValuationSubring K
a : ↥A
h : A.valuation ↑a = 1
ha : ↑a ≠ 0
⊢ IsUnit a
state_after: K : Type u
inst✝ : Field K
A : ValuationSubring K
a : ↥A
h : A.valuation ↑a = 1
ha : ↑a ≠ 0
ha' : (↑a)⁻¹ ∈ A
⊢ IsUnit a

tactic: apply isUnit_of_mul_eq_one a ⟨a⁻¹, ha'⟩
state_before: K : Type u
inst✝ : Field K
A : ValuationSubring K
a : ↥A
h : A.valuation ↑a = 1
ha : ↑a ≠ 0
ha' : (↑a)⁻¹ ∈ A
⊢ IsUnit a
state_after: K : Type u
inst✝ : Field K
A : ValuationSubring K
a : ↥A
h : A.valuation ↑a = 1
ha : ↑a ≠ 0
ha' : (↑a)⁻¹ ∈ A
⊢ a * ⟨(↑a)⁻¹, ha'⟩ = 1

tactic: ext
state_before: K : Type u
inst✝ : Field K
A : ValuationSubring K
a : ↥A
h : A.valuation ↑a = 1
ha : ↑a ≠ 0
ha' : (↑a)⁻¹ ∈ A
⊢ a * ⟨(↑a)⁻¹, ha'⟩ = 1
state_after: case a
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : ↥A
h : A.valuation ↑a = 1
ha : ↑a ≠ 0
ha' : (↑a)⁻¹ ∈ A
⊢ ↑(a * ⟨(↑a)⁻¹, ha'⟩) = ↑1

tactic: field_simp
state_before: case a
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : ↥A
h : A.valuation ↑a = 1
ha : ↑a ≠ 0
ha' : (↑a)⁻¹ ∈ A
⊢ ↑(a * ⟨(↑a)⁻¹, ha'⟩) = ↑1
state_after: no goals

tactic: intro c
state_before: K : Type u
inst✝ : Field K
A : ValuationSubring K
a : ↥A
h : A.valuation ↑a = 1
⊢ ↑a ≠ 0
state_after: K : Type u
inst✝ : Field K
A : ValuationSubring K
a : ↥A
h : A.valuation ↑a = 1
c : ↑a = 0
⊢ False

tactic: rw [c, A.valuation.map_zero] at h
state_before: K : Type u
inst✝ : Field K
A : ValuationSubring K
a : ↥A
h : A.valuation ↑a = 1
c : ↑a = 0
⊢ False
state_after: K : Type u
inst✝ : Field K
A : ValuationSubring K
a : ↥A
h : 0 = 1
c : ↑a = 0
⊢ False

tactic: exact zero_ne_one h
state_before: K : Type u
inst✝ : Field K
A : ValuationSubring K
a : ↥A
h : 0 = 1
c : ↑a = 0
⊢ False
state_after: no goals

tactic: rw [← valuation_le_one_iff, map_inv₀, h, inv_one]
state_before: K : Type u
inst✝ : Field K
A : ValuationSubring K
a : ↥A
h : A.valuation ↑a = 1
ha : ↑a ≠ 0
⊢ (↑a)⁻¹ ∈ A
state_after: no goals
Theorem: Part.some_mod_some
File: Mathlib/Data/Part.lean

tactic: simp [mod_def]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : Mod α
a b : α
⊢ some a % some b = some (a % b)
state_after: no goals
Theorem: Orientation.oangle_add_cyc3_neg_right
File: Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean

tactic: simp_rw [← oangle_neg_left_eq_neg_right, o.oangle_add_cyc3_neg_left hx hy hz]
state_before: V : Type u_1
V' : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : NormedAddCommGroup V'
inst✝³ : InnerProductSpace ℝ V
inst✝² : InnerProductSpace ℝ V'
inst✝¹ : Fact (finrank ℝ V = 2)
inst✝ : Fact (finrank ℝ V' = 2)
o : Orientation ℝ V (Fin 2)
x y z : V
hx : x ≠ 0
hy : y ≠ 0
hz : z ≠ 0
⊢ o.oangle x (-y) + o.oangle y (-z) + o.oangle z (-x) = ↑π
state_after: no goals
Theorem: Nat.AB_id_helper
File: Mathlib/NumberTheory/FermatPsp.lean

tactic: have q₁ : b - 1 ∣ b ^ p - 1 := by simpa only [one_pow] using nat_sub_dvd_pow_sub_pow b 1 p
state_before: b p : ℕ
x✝ : 2 ≤ b
hp : Odd p
⊢ (b ^ p - 1) / (b - 1) * ((b ^ p + 1) / (b + 1)) = (b ^ (2 * p) - 1) / (b ^ 2 - 1)
state_after: b p : ℕ
x✝ : 2 ≤ b
hp : Odd p
q₁ : b - 1 ∣ b ^ p - 1
⊢ (b ^ p - 1) / (b - 1) * ((b ^ p + 1) / (b + 1)) = (b ^ (2 * p) - 1) / (b ^ 2 - 1)

tactic: have q₂ : b + 1 ∣ b ^ p + 1 := by simpa only [one_pow] using hp.nat_add_dvd_pow_add_pow b 1
state_before: b p : ℕ
x✝ : 2 ≤ b
hp : Odd p
q₁ : b - 1 ∣ b ^ p - 1
⊢ (b ^ p - 1) / (b - 1) * ((b ^ p + 1) / (b + 1)) = (b ^ (2 * p) - 1) / (b ^ 2 - 1)
state_after: b p : ℕ
x✝ : 2 ≤ b
hp : Odd p
q₁ : b - 1 ∣ b ^ p - 1
q₂ : b + 1 ∣ b ^ p + 1
⊢ (b ^ p - 1) / (b - 1) * ((b ^ p + 1) / (b + 1)) = (b ^ (2 * p) - 1) / (b ^ 2 - 1)

tactic: convert Nat.div_mul_div_comm q₁ q₂ using 2 <;> rw [mul_comm (_ - 1), ← Nat.sq_sub_sq]
state_before: b p : ℕ
x✝ : 2 ≤ b
hp : Odd p
q₁ : b - 1 ∣ b ^ p - 1
q₂ : b + 1 ∣ b ^ p + 1
⊢ (b ^ p - 1) / (b - 1) * ((b ^ p + 1) / (b + 1)) = (b ^ (2 * p) - 1) / (b ^ 2 - 1)
state_after: case h.e'_3.h.e'_5
b p : ℕ
x✝ : 2 ≤ b
hp : Odd p
q₁ : b - 1 ∣ b ^ p - 1
q₂ : b + 1 ∣ b ^ p + 1
⊢ b ^ (2 * p) - 1 = (b ^ p) ^ 2 - 1 ^ 2

tactic: ring_nf
state_before: case h.e'_3.h.e'_5
b p : ℕ
x✝ : 2 ≤ b
hp : Odd p
q₁ : b - 1 ∣ b ^ p - 1
q₂ : b + 1 ∣ b ^ p + 1
⊢ b ^ (2 * p) - 1 = (b ^ p) ^ 2 - 1 ^ 2
state_after: no goals

tactic: simpa only [one_pow] using nat_sub_dvd_pow_sub_pow b 1 p
state_before: b p : ℕ
x✝ : 2 ≤ b
hp : Odd p
⊢ b - 1 ∣ b ^ p - 1
state_after: no goals

tactic: simpa only [one_pow] using hp.nat_add_dvd_pow_add_pow b 1
state_before: b p : ℕ
x✝ : 2 ≤ b
hp : Odd p
q₁ : b - 1 ∣ b ^ p - 1
⊢ b + 1 ∣ b ^ p + 1
state_after: no goals
Theorem: Filter.mem_comap_iff_compl
File: Mathlib/Order/Filter/Basic.lean

tactic: simp only [mem_comap'', kernImage_eq_compl]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l✝ : Filter α
f : α → β
l : Filter β
p : α → Prop
s : Set α
⊢ s ∈ comap f l ↔ (f '' sᶜ)ᶜ ∈ l
state_after: no goals
Theorem: Finset.card_nbij
File: Mathlib/Data/Finset/Card.lean

tactic: simpa using i_surj
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s t✝ u : Finset α
f : α → β
n : ℕ
t : Finset β
i : α → β
hi : ∀ a ∈ s, i a ∈ t
i_inj : Set.InjOn i ↑s
i_surj : Set.SurjOn i ↑s ↑t
⊢ ∀ b ∈ t, ∃ a, ∃ (ha : a ∈ s), (fun a x => i a) a ha = b
state_after: no goals
Theorem: RCLike.nonpos_iff_exists_ofReal
File: Mathlib/Analysis/RCLike/Basic.lean

tactic: simp_rw [nonpos_iff (K := K), ext_iff (K := K)]
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z w : K
⊢ z ≤ 0 ↔ ∃ x ≤ 0, ↑x = z
state_after: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z w : K
⊢ re z ≤ 0 ∧ im z = 0 ↔ ∃ x ≤ 0, re ↑x = re z ∧ im ↑x = im z

tactic: aesop
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z w : K
⊢ re z ≤ 0 ∧ im z = 0 ↔ ∃ x ≤ 0, re ↑x = re z ∧ im ↑x = im z
state_after: no goals
Theorem: HurwitzZeta.LSeriesHasSum_exp
File: Mathlib/NumberTheory/LSeries/HurwitzZeta.lean

tactic: refine (hasSum_expZeta_of_one_lt_re a hs).congr_fun (fun n ↦ ?_)
state_before: a : ℝ
s : ℂ
hs : 1 < s.re
⊢ LSeriesHasSum (fun x => cexp (2 * ↑π * I * ↑a * ↑x)) s (expZeta (↑a) s)
state_after: a : ℝ
s : ℂ
hs : 1 < s.re
n : ℕ
⊢ LSeries.term (fun x => cexp (2 * ↑π * I * ↑a * ↑x)) s n = cexp (2 * ↑π * I * ↑a * ↑n) / ↑n ^ s

tactic: rcases eq_or_ne n 0 with rfl | hn
state_before: a : ℝ
s : ℂ
hs : 1 < s.re
n : ℕ
⊢ LSeries.term (fun x => cexp (2 * ↑π * I * ↑a * ↑x)) s n = cexp (2 * ↑π * I * ↑a * ↑n) / ↑n ^ s
state_after: case inl
a : ℝ
s : ℂ
hs : 1 < s.re
⊢ LSeries.term (fun x => cexp (2 * ↑π * I * ↑a * ↑x)) s 0 = cexp (2 * ↑π * I * ↑a * ↑0) / ↑0 ^ s

case inr
a : ℝ
s : ℂ
hs : 1 < s.re
n : ℕ
hn : n ≠ 0
⊢ LSeries.term (fun x => cexp (2 * ↑π * I * ↑a * ↑x)) s n = cexp (2 * ↑π * I * ↑a * ↑n) / ↑n ^ s

tactic: rw [LSeries.term_zero, Nat.cast_zero, zero_cpow (ne_zero_of_one_lt_re hs), div_zero]
state_before: case inl
a : ℝ
s : ℂ
hs : 1 < s.re
⊢ LSeries.term (fun x => cexp (2 * ↑π * I * ↑a * ↑x)) s 0 = cexp (2 * ↑π * I * ↑a * ↑0) / ↑0 ^ s
state_after: no goals

tactic: apply LSeries.term_of_ne_zero hn
state_before: case inr
a : ℝ
s : ℂ
hs : 1 < s.re
n : ℕ
hn : n ≠ 0
⊢ LSeries.term (fun x => cexp (2 * ↑π * I * ↑a * ↑x)) s n = cexp (2 * ↑π * I * ↑a * ↑n) / ↑n ^ s
state_after: no goals
Theorem: SimpleGraph.Connected.exists_path_of_dist
File: Mathlib/Combinatorics/SimpleGraph/Metric.lean

tactic: obtain ⟨p, h⟩ := hconn.exists_walk_of_dist u v
state_before: V : Type u_1
G : SimpleGraph V
hconn : G.Connected
u v : V
⊢ ∃ p, p.IsPath ∧ p.length = G.dist u v
state_after: case intro
V : Type u_1
G : SimpleGraph V
hconn : G.Connected
u v : V
p : G.Walk u v
h : p.length = G.dist u v
⊢ ∃ p, p.IsPath ∧ p.length = G.dist u v

tactic: exact ⟨p, p.isPath_of_length_eq_dist h, h⟩
state_before: case intro
V : Type u_1
G : SimpleGraph V
hconn : G.Connected
u v : V
p : G.Walk u v
h : p.length = G.dist u v
⊢ ∃ p, p.IsPath ∧ p.length = G.dist u v
state_after: no goals
Theorem: Homeomorph.mulLeft_symm
File: Mathlib/Topology/Algebra/Group/Basic.lean

tactic: ext
state_before: G : Type w
H : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : ContinuousMul G
a : G
⊢ (Homeomorph.mulLeft a).symm = Homeomorph.mulLeft a⁻¹
state_after: case H
G : Type w
H : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : ContinuousMul G
a x✝ : G
⊢ (Homeomorph.mulLeft a).symm x✝ = (Homeomorph.mulLeft a⁻¹) x✝

tactic: rfl
state_before: case H
G : Type w
H : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : ContinuousMul G
a x✝ : G
⊢ (Homeomorph.mulLeft a).symm x✝ = (Homeomorph.mulLeft a⁻¹) x✝
state_after: no goals
Theorem: List.Nodup.rotate_congr_iff
File: Mathlib/Data/List/Rotate.lean

tactic: rcases eq_or_ne l [] with rfl | hn
state_before: α : Type u
l : List α
hl : l.Nodup
i j : ℕ
⊢ l.rotate i = l.rotate j ↔ i % l.length = j % l.length ∨ l = []
state_after: case inl
α : Type u
i j : ℕ
hl : [].Nodup
⊢ [].rotate i = [].rotate j ↔ i % [].length = j % [].length ∨ [] = []

case inr
α : Type u
l : List α
hl : l.Nodup
i j : ℕ
hn : l ≠ []
⊢ l.rotate i = l.rotate j ↔ i % l.length = j % l.length ∨ l = []

tactic: simp
state_before: case inl
α : Type u
i j : ℕ
hl : [].Nodup
⊢ [].rotate i = [].rotate j ↔ i % [].length = j % [].length ∨ [] = []
state_after: no goals

tactic: simp only [hn, or_false]
state_before: case inr
α : Type u
l : List α
hl : l.Nodup
i j : ℕ
hn : l ≠ []
⊢ l.rotate i = l.rotate j ↔ i % l.length = j % l.length ∨ l = []
state_after: case inr
α : Type u
l : List α
hl : l.Nodup
i j : ℕ
hn : l ≠ []
⊢ l.rotate i = l.rotate j ↔ i % l.length = j % l.length

tactic: refine ⟨hl.rotate_congr hn _ _, fun h ↦ ?_⟩
state_before: case inr
α : Type u
l : List α
hl : l.Nodup
i j : ℕ
hn : l ≠ []
⊢ l.rotate i = l.rotate j ↔ i % l.length = j % l.length
state_after: case inr
α : Type u
l : List α
hl : l.Nodup
i j : ℕ
hn : l ≠ []
h : i % l.length = j % l.length
⊢ l.rotate i = l.rotate j

tactic: rw [← rotate_mod, h, rotate_mod]
state_before: case inr
α : Type u
l : List α
hl : l.Nodup
i j : ℕ
hn : l ≠ []
h : i % l.length = j % l.length
⊢ l.rotate i = l.rotate j
state_after: no goals
Theorem: Ideal.Polynomial.isMaximal_comap_C_of_isJacobson
File: Mathlib/RingTheory/Jacobson.lean

tactic: rw [← @mk_ker _ _ P, RingHom.ker_eq_comap_bot, comap_comap]
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsJacobson R
P : Ideal R[X]
hP : P.IsMaximal
⊢ (comap C P).IsMaximal
state_after: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsJacobson R
P : Ideal R[X]
hP : P.IsMaximal
⊢ (comap ((Quotient.mk P).comp C) ⊥).IsMaximal

tactic: have := (bot_quotient_isMaximal_iff _).mpr hP
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsJacobson R
P : Ideal R[X]
hP : P.IsMaximal
⊢ (comap ((Quotient.mk P).comp C) ⊥).IsMaximal
state_after: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsJacobson R
P : Ideal R[X]
hP : P.IsMaximal
this : ⊥.IsMaximal
⊢ (comap ((Quotient.mk P).comp C) ⊥).IsMaximal

tactic: exact isMaximal_comap_of_isIntegral_of_isMaximal' _ (quotient_mk_comp_C_isIntegral_of_jacobson P)
  ⊥
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsJacobson R
P : Ideal R[X]
hP : P.IsMaximal
this : ⊥.IsMaximal
⊢ (comap ((Quotient.mk P).comp C) ⊥).IsMaximal
state_after: no goals
Theorem: AddChar.starComp_apply
File: Mathlib/NumberTheory/LegendreSymbol/AddCharacter.lean

tactic: rw [← starComp_eq_inv hR]
state_before: R : Type u_1
inst✝ : CommRing R
hR : 0 < ringChar R
φ : AddChar R ℂ
a : R
⊢ (starRingEnd ℂ) (φ a) = φ⁻¹ a
state_after: R : Type u_1
inst✝ : CommRing R
hR : 0 < ringChar R
φ : AddChar R ℂ
a : R
⊢ (starRingEnd ℂ) (φ a) = ((↑(starRingEnd ℂ)).compAddChar φ) a

tactic: rfl
state_before: R : Type u_1
inst✝ : CommRing R
hR : 0 < ringChar R
φ : AddChar R ℂ
a : R
⊢ (starRingEnd ℂ) (φ a) = ((↑(starRingEnd ℂ)).compAddChar φ) a
state_after: no goals