1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: neg_npow_assoc
File: Mathlib/Algebra/Group/NatPowAssoc.lean

tactic: induction k with
| zero => simp only [npow_zero, one_mul]
| succ k ih =>
  rw [npow_add, npow_one, ← neg_mul_comm, mul_one]
  simp only [neg_mul, ih]
state_before: M : Type u_1
R : Type u_2
inst✝² : NonAssocRing R
inst✝¹ : Pow R ℕ
inst✝ : NatPowAssoc R
a b : R
k : ℕ
⊢ (-1) ^ k * a * b = (-1) ^ k * (a * b)
state_after: no goals

tactic: simp only [npow_zero, one_mul]
state_before: case zero
M : Type u_1
R : Type u_2
inst✝² : NonAssocRing R
inst✝¹ : Pow R ℕ
inst✝ : NatPowAssoc R
a b : R
⊢ (-1) ^ 0 * a * b = (-1) ^ 0 * (a * b)
state_after: no goals

tactic: rw [npow_add, npow_one, ← neg_mul_comm, mul_one]
state_before: case succ
M : Type u_1
R : Type u_2
inst✝² : NonAssocRing R
inst✝¹ : Pow R ℕ
inst✝ : NatPowAssoc R
a b : R
k : ℕ
ih : (-1) ^ k * a * b = (-1) ^ k * (a * b)
⊢ (-1) ^ (k + 1) * a * b = (-1) ^ (k + 1) * (a * b)
state_after: case succ
M : Type u_1
R : Type u_2
inst✝² : NonAssocRing R
inst✝¹ : Pow R ℕ
inst✝ : NatPowAssoc R
a b : R
k : ℕ
ih : (-1) ^ k * a * b = (-1) ^ k * (a * b)
⊢ -(-1) ^ k * a * b = -(-1) ^ k * (a * b)

tactic: simp only [neg_mul, ih]
state_before: case succ
M : Type u_1
R : Type u_2
inst✝² : NonAssocRing R
inst✝¹ : Pow R ℕ
inst✝ : NatPowAssoc R
a b : R
k : ℕ
ih : (-1) ^ k * a * b = (-1) ^ k * (a * b)
⊢ -(-1) ^ k * a * b = -(-1) ^ k * (a * b)
state_after: no goals
Theorem: EuclideanGeometry.Cospherical.subset
File: Mathlib/Geometry/Euclidean/Sphere/Basic.lean

tactic: rcases hc with ⟨c, r, hcr⟩
state_before: V : Type u_1
P : Type u_2
inst✝ : MetricSpace P
ps₁ ps₂ : Set P
hs : ps₁ ⊆ ps₂
hc : Cospherical ps₂
⊢ Cospherical ps₁
state_after: case intro.intro
V : Type u_1
P : Type u_2
inst✝ : MetricSpace P
ps₁ ps₂ : Set P
hs : ps₁ ⊆ ps₂
c : P
r : ℝ
hcr : ∀ p ∈ ps₂, dist p c = r
⊢ Cospherical ps₁

tactic: exact ⟨c, r, fun p hp => hcr p (hs hp)⟩
state_before: case intro.intro
V : Type u_1
P : Type u_2
inst✝ : MetricSpace P
ps₁ ps₂ : Set P
hs : ps₁ ⊆ ps₂
c : P
r : ℝ
hcr : ∀ p ∈ ps₂, dist p c = r
⊢ Cospherical ps₁
state_after: no goals
Theorem: ZNum.cmp_to_int
File: Mathlib/Data/Num/Lemmas.lean

tactic: have := PosNum.cmp_to_nat a b
state_before: α : Type u_1
a b : PosNum
⊢ Ordering.casesOn ((pos a).cmp (pos b)) (↑(pos a) < ↑(pos b)) (pos a = pos b) (↑(pos b) < ↑(pos a))
state_after: α : Type u_1
a b : PosNum
this : Ordering.casesOn (a.cmp b) (↑a < ↑b) (a = b) (↑b < ↑a)
⊢ Ordering.casesOn ((pos a).cmp (pos b)) (↑(pos a) < ↑(pos b)) (pos a = pos b) (↑(pos b) < ↑(pos a))

tactic: revert this
state_before: α : Type u_1
a b : PosNum
this : Ordering.casesOn (a.cmp b) (↑a < ↑b) (a = b) (↑b < ↑a)
⊢ Ordering.casesOn ((pos a).cmp (pos b)) (↑(pos a) < ↑(pos b)) (pos a = pos b) (↑(pos b) < ↑(pos a))
state_after: α : Type u_1
a b : PosNum
⊢ Ordering.casesOn (a.cmp b) (↑a < ↑b) (a = b) (↑b < ↑a) →
    Ordering.casesOn ((pos a).cmp (pos b)) (↑(pos a) < ↑(pos b)) (pos a = pos b) (↑(pos b) < ↑(pos a))

tactic: dsimp [cmp]
state_before: α : Type u_1
a b : PosNum
⊢ Ordering.casesOn (a.cmp b) (↑a < ↑b) (a = b) (↑b < ↑a) →
    Ordering.casesOn ((pos a).cmp (pos b)) (↑(pos a) < ↑(pos b)) (pos a = pos b) (↑(pos b) < ↑(pos a))
state_after: α : Type u_1
a b : PosNum
⊢ Ordering.rec (↑a < ↑b) (a = b) (↑b < ↑a) (a.cmp b) → Ordering.rec (↑a < ↑b) (pos a = pos b) (↑b < ↑a) (a.cmp b)

tactic: cases PosNum.cmp a b <;> dsimp <;> [simp; exact congr_arg pos; simp [GT.gt]]
state_before: α : Type u_1
a b : PosNum
⊢ Ordering.rec (↑a < ↑b) (a = b) (↑b < ↑a) (a.cmp b) → Ordering.rec (↑a < ↑b) (pos a = pos b) (↑b < ↑a) (a.cmp b)
state_after: no goals

tactic: have := PosNum.cmp_to_nat b a
state_before: α : Type u_1
a b : PosNum
⊢ Ordering.casesOn ((neg a).cmp (neg b)) (↑(neg a) < ↑(neg b)) (neg a = neg b) (↑(neg b) < ↑(neg a))
state_after: α : Type u_1
a b : PosNum
this : Ordering.casesOn (b.cmp a) (↑b < ↑a) (b = a) (↑a < ↑b)
⊢ Ordering.casesOn ((neg a).cmp (neg b)) (↑(neg a) < ↑(neg b)) (neg a = neg b) (↑(neg b) < ↑(neg a))

tactic: revert this
state_before: α : Type u_1
a b : PosNum
this : Ordering.casesOn (b.cmp a) (↑b < ↑a) (b = a) (↑a < ↑b)
⊢ Ordering.casesOn ((neg a).cmp (neg b)) (↑(neg a) < ↑(neg b)) (neg a = neg b) (↑(neg b) < ↑(neg a))
state_after: α : Type u_1
a b : PosNum
⊢ Ordering.casesOn (b.cmp a) (↑b < ↑a) (b = a) (↑a < ↑b) →
    Ordering.casesOn ((neg a).cmp (neg b)) (↑(neg a) < ↑(neg b)) (neg a = neg b) (↑(neg b) < ↑(neg a))

tactic: dsimp [cmp]
state_before: α : Type u_1
a b : PosNum
⊢ Ordering.casesOn (b.cmp a) (↑b < ↑a) (b = a) (↑a < ↑b) →
    Ordering.casesOn ((neg a).cmp (neg b)) (↑(neg a) < ↑(neg b)) (neg a = neg b) (↑(neg b) < ↑(neg a))
state_after: α : Type u_1
a b : PosNum
⊢ Ordering.rec (↑b < ↑a) (b = a) (↑a < ↑b) (b.cmp a) → Ordering.rec (-↑a < -↑b) (neg a = neg b) (-↑b < -↑a) (b.cmp a)

tactic: cases PosNum.cmp b a <;> dsimp <;> [simp; simp (config := { contextual := true }); simp [GT.gt]]
state_before: α : Type u_1
a b : PosNum
⊢ Ordering.rec (↑b < ↑a) (b = a) (↑a < ↑b) (b.cmp a) → Ordering.rec (-↑a < -↑b) (neg a = neg b) (-↑b < -↑a) (b.cmp a)
state_after: no goals
Theorem: EReal.add_lt_add_of_lt_of_le'
File: Mathlib/Data/Real/EReal.lean

tactic: rcases h'.eq_or_lt with (rfl | hlt)
state_before: x y z t : EReal
h : x < y
h' : z ≤ t
hbot : t ≠ ⊥
htop : t = ⊤ → z = ⊤ → x = ⊥
⊢ x + z < y + t
state_after: case inl
x y z : EReal
h : x < y
h' : z ≤ z
hbot : z ≠ ⊥
htop : z = ⊤ → z = ⊤ → x = ⊥
⊢ x + z < y + z

case inr
x y z t : EReal
h : x < y
h' : z ≤ t
hbot : t ≠ ⊥
htop : t = ⊤ → z = ⊤ → x = ⊥
hlt : z < t
⊢ x + z < y + t

tactic: rcases eq_or_ne z ⊤ with (rfl | hz)
state_before: case inl
x y z : EReal
h : x < y
h' : z ≤ z
hbot : z ≠ ⊥
htop : z = ⊤ → z = ⊤ → x = ⊥
⊢ x + z < y + z
state_after: case inl.inl
x y : EReal
h : x < y
h' : ⊤ ≤ ⊤
hbot : ⊤ ≠ ⊥
htop : ⊤ = ⊤ → ⊤ = ⊤ → x = ⊥
⊢ x + ⊤ < y + ⊤

case inl.inr
x y z : EReal
h : x < y
h' : z ≤ z
hbot : z ≠ ⊥
htop : z = ⊤ → z = ⊤ → x = ⊥
hz : z ≠ ⊤
⊢ x + z < y + z

tactic: lift z to ℝ using ⟨hz, hbot⟩
state_before: case inl.inr
x y z : EReal
h : x < y
h' : z ≤ z
hbot : z ≠ ⊥
htop : z = ⊤ → z = ⊤ → x = ⊥
hz : z ≠ ⊤
⊢ x + z < y + z
state_after: case inl.inr.intro
x y : EReal
h : x < y
z : ℝ
h' : ↑z ≤ ↑z
hbot : ↑z ≠ ⊥
htop : ↑z = ⊤ → ↑z = ⊤ → x = ⊥
hz : ↑z ≠ ⊤
⊢ x + ↑z < y + ↑z

tactic: exact add_lt_add_right_coe h z
state_before: case inl.inr.intro
x y : EReal
h : x < y
z : ℝ
h' : ↑z ≤ ↑z
hbot : ↑z ≠ ⊥
htop : ↑z = ⊤ → ↑z = ⊤ → x = ⊥
hz : ↑z ≠ ⊤
⊢ x + ↑z < y + ↑z
state_after: no goals

tactic: obtain rfl := htop rfl rfl
state_before: case inl.inl
x y : EReal
h : x < y
h' : ⊤ ≤ ⊤
hbot : ⊤ ≠ ⊥
htop : ⊤ = ⊤ → ⊤ = ⊤ → x = ⊥
⊢ x + ⊤ < y + ⊤
state_after: case inl.inl
y : EReal
h' : ⊤ ≤ ⊤
hbot : ⊤ ≠ ⊥
h : ⊥ < y
htop : ⊤ = ⊤ → ⊤ = ⊤ → ⊥ = ⊥
⊢ ⊥ + ⊤ < y + ⊤

tactic: simpa
state_before: case inl.inl
y : EReal
h' : ⊤ ≤ ⊤
hbot : ⊤ ≠ ⊥
h : ⊥ < y
htop : ⊤ = ⊤ → ⊤ = ⊤ → ⊥ = ⊥
⊢ ⊥ + ⊤ < y + ⊤
state_after: no goals

tactic: exact add_lt_add h hlt
state_before: case inr
x y z t : EReal
h : x < y
h' : z ≤ t
hbot : t ≠ ⊥
htop : t = ⊤ → z = ⊤ → x = ⊥
hlt : z < t
⊢ x + z < y + t
state_after: no goals
Theorem: nhdsWithin_empty
File: Mathlib/Topology/ContinuousOn.lean

tactic: rw [nhdsWithin, principal_empty, inf_bot_eq]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : TopologicalSpace α
a : α
⊢ 𝓝[∅] a = ⊥
state_after: no goals
Theorem: List.splitOnP_eq_splitOnPTR
File: .lake/packages/batteries/Batteries/Data/List/Basic.lean

tactic: funext α P l
state_before: ⊢ @splitOnP = @splitOnPTR
state_after: case h.h.h
α : Type u_1
P : α → Bool
l : List α
⊢ splitOnP P l = splitOnPTR P l

tactic: simp [splitOnPTR]
state_before: case h.h.h
α : Type u_1
P : α → Bool
l : List α
⊢ splitOnP P l = splitOnPTR P l
state_after: case h.h.h
α : Type u_1
P : α → Bool
l : List α
⊢ splitOnP P l = splitOnPTR.go P l #[] #[]

tactic: suffices ∀ xs acc r, splitOnPTR.go P xs acc r = r.data ++ splitOnP.go P xs acc.data.reverse from
  (this l #[] #[]).symm
state_before: case h.h.h
α : Type u_1
P : α → Bool
l : List α
⊢ splitOnP P l = splitOnPTR.go P l #[] #[]
state_after: case h.h.h
α : Type u_1
P : α → Bool
l : List α
⊢ ∀ (xs : List α) (acc : Array α) (r : Array (List α)),
    splitOnPTR.go P xs acc r = r.data ++ splitOnP.go P xs acc.data.reverse

tactic: intro xs acc r
state_before: case h.h.h
α : Type u_1
P : α → Bool
l : List α
⊢ ∀ (xs : List α) (acc : Array α) (r : Array (List α)),
    splitOnPTR.go P xs acc r = r.data ++ splitOnP.go P xs acc.data.reverse
state_after: case h.h.h
α : Type u_1
P : α → Bool
l xs : List α
acc : Array α
r : Array (List α)
⊢ splitOnPTR.go P xs acc r = r.data ++ splitOnP.go P xs acc.data.reverse

tactic: induction xs generalizing acc r with simp [splitOnP.go, splitOnPTR.go]
| cons x xs IH => cases P x <;> simp [*]
state_before: case h.h.h
α : Type u_1
P : α → Bool
l xs : List α
acc : Array α
r : Array (List α)
⊢ splitOnPTR.go P xs acc r = r.data ++ splitOnP.go P xs acc.data.reverse
state_after: no goals

tactic: cases P x <;> simp [*]
state_before: case h.h.h.cons
α : Type u_1
P : α → Bool
l : List α
x : α
xs : List α
IH : ∀ (acc : Array α) (r : Array (List α)), splitOnPTR.go P xs acc r = r.data ++ splitOnP.go P xs acc.data.reverse
acc : Array α
r : Array (List α)
⊢ (bif P x then splitOnPTR.go P xs #[] (r.push acc.data) else splitOnPTR.go P xs (acc.push x) r) =
    r.data ++ if P x = true then acc.data :: splitOnP.go P xs [] else splitOnP.go P xs (x :: acc.data.reverse)
state_after: no goals
Theorem: Complex.exp_inj_of_neg_pi_lt_of_le_pi
File: Mathlib/Analysis/SpecialFunctions/Complex/Log.lean

tactic: rw [← log_exp hx₁ hx₂, ← log_exp hy₁ hy₂, hxy]
state_before: x y : ℂ
hx₁ : -π < x.im
hx₂ : x.im ≤ π
hy₁ : -π < y.im
hy₂ : y.im ≤ π
hxy : cexp x = cexp y
⊢ x = y
state_after: no goals
Theorem: List.sizeOf_kerase
File: Mathlib/Data/List/Sigma.lean

tactic: simp only [SizeOf.sizeOf, _sizeOf_1]
state_before: α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝² inst✝¹ : DecidableEq α
inst✝ : SizeOf (Sigma β)
x : α
xs : List (Sigma β)
⊢ sizeOf (kerase x xs) ≤ sizeOf xs
state_after: α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝² inst✝¹ : DecidableEq α
inst✝ : SizeOf (Sigma β)
x : α
xs : List (Sigma β)
⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (kerase x xs) ≤
    rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs

tactic: induction' xs with y ys
state_before: α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝² inst✝¹ : DecidableEq α
inst✝ : SizeOf (Sigma β)
x : α
xs : List (Sigma β)
⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (kerase x xs) ≤
    rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs
state_after: case nil
α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝² inst✝¹ : DecidableEq α
inst✝ : SizeOf (Sigma β)
x : α
⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (kerase x []) ≤
    rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) []

case cons
α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝² inst✝¹ : DecidableEq α
inst✝ : SizeOf (Sigma β)
x : α
y : Sigma β
ys : List (Sigma β)
tail_ih✝ :
  rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (kerase x ys) ≤
    rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) ys
⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (kerase x (y :: ys)) ≤
    rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (y :: ys)

tactic: simp
state_before: case nil
α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝² inst✝¹ : DecidableEq α
inst✝ : SizeOf (Sigma β)
x : α
⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (kerase x []) ≤
    rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) []
state_after: no goals

tactic: by_cases x = y.1 <;> simp [*]
state_before: case cons
α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝² inst✝¹ : DecidableEq α
inst✝ : SizeOf (Sigma β)
x : α
y : Sigma β
ys : List (Sigma β)
tail_ih✝ :
  rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (kerase x ys) ≤
    rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) ys
⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (kerase x (y :: ys)) ≤
    rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (y :: ys)
state_after: no goals
Theorem: Real.differentiableAt_Gamma
File: Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean

tactic: refine (Complex.differentiableAt_Gamma _ ?_).hasDerivAt.real_of_complex.differentiableAt
state_before: s : ℝ
hs : ∀ (m : ℕ), s ≠ -↑m
⊢ DifferentiableAt ℝ Gamma s
state_after: s : ℝ
hs : ∀ (m : ℕ), s ≠ -↑m
⊢ ∀ (m : ℕ), ↑s ≠ -↑m

tactic: simp_rw [← Complex.ofReal_natCast, ← Complex.ofReal_neg, Ne, Complex.ofReal_inj]
state_before: s : ℝ
hs : ∀ (m : ℕ), s ≠ -↑m
⊢ ∀ (m : ℕ), ↑s ≠ -↑m
state_after: s : ℝ
hs : ∀ (m : ℕ), s ≠ -↑m
⊢ ∀ (m : ℕ), ¬s = -↑m

tactic: exact hs
state_before: s : ℝ
hs : ∀ (m : ℕ), s ≠ -↑m
⊢ ∀ (m : ℕ), ¬s = -↑m
state_after: no goals
Theorem: ProbabilityTheory.kernel.withDensity_apply'
File: Mathlib/Probability/Kernel/WithDensity.lean

tactic: rw [kernel.withDensity_apply κ hf, withDensity_apply' _ s]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ✝ : ↥(kernel α β)
f : α → β → ℝ≥0∞
κ : ↥(kernel α β)
inst✝ : IsSFiniteKernel κ
hf : Measurable (Function.uncurry f)
a : α
s : Set β
⊢ ((withDensity κ f) a) s = ∫⁻ (b : β) in s, f a b ∂κ a
state_after: no goals
Theorem: CategoryTheory.isCodetector_unop_iff
File: Mathlib/CategoryTheory/Generator.lean

tactic: rw [IsDetector, IsCodetector, ← isCodetecting_unop_iff, Set.singleton_unop]
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
G : Cᵒᵖ
⊢ IsCodetector G.unop ↔ IsDetector G
state_after: no goals
Theorem: RCLike.conj_ofReal
File: Mathlib/Analysis/RCLike/Basic.lean

tactic: rw [ext_iff]
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
r : ℝ
⊢ (starRingEnd K) ↑r = ↑r
state_after: K : Type u_1
E : Type u_2
inst✝ : RCLike K
r : ℝ
⊢ re ((starRingEnd K) ↑r) = re ↑r ∧ im ((starRingEnd K) ↑r) = im ↑r

tactic: simp only [ofReal_im, conj_im, eq_self_iff_true, conj_re, and_self_iff, neg_zero]
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
r : ℝ
⊢ re ((starRingEnd K) ↑r) = re ↑r ∧ im ((starRingEnd K) ↑r) = im ↑r
state_after: no goals
Theorem: Ordinal.nmul_lt_nmul_of_pos_right
File: Mathlib/SetTheory/Ordinal/NaturalOps.lean

tactic: simp
state_before: a b c d : Ordinal.{u}
h₁ : a < b
h₂ : 0 < c
⊢ a ⨳ c ♯ a ⨳ 0 ≤ a ⨳ c ♯ b ⨳ 0
state_after: no goals
Theorem: one_le_pow_iff_of_nonneg
File: Mathlib/Algebra/Order/Ring/Basic.lean

tactic: simpa only [one_pow] using pow_le_pow_iff_left (zero_le_one' R) ha hn
state_before: α : Type u_1
M : Type u_2
R : Type u_3
inst✝ : LinearOrderedSemiring R
a b : R
m n : ℕ
ha : 0 ≤ a
hn : n ≠ 0
⊢ 1 ≤ a ^ n ↔ 1 ≤ a
state_after: no goals
Theorem: Real.logb_lt_iff_lt_rpow_of_base_lt_one
File: Mathlib/Analysis/SpecialFunctions/Log/Base.lean

tactic: rw [← rpow_lt_rpow_left_iff_of_base_lt_one b_pos b_lt_one, rpow_logb b_pos (b_ne_one b_lt_one) hx]
state_before: b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
hx : 0 < x
⊢ logb b x < y ↔ b ^ y < x
state_after: no goals
Theorem: Finset.image₂_swap
File: Mathlib/Data/Finset/NAry.lean

tactic: push_cast
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
γ' : Type u_6
δ : Type u_7
δ' : Type u_8
ε : Type u_9
ε' : Type u_10
ζ : Type u_11
ζ' : Type u_12
ν : Type u_13
inst✝⁷ : DecidableEq α'
inst✝⁶ : DecidableEq β'
inst✝⁵ : DecidableEq γ
inst✝⁴ : DecidableEq γ'
inst✝³ : DecidableEq δ
inst✝² : DecidableEq δ'
inst✝¹ : DecidableEq ε
inst✝ : DecidableEq ε'
f✝ f' : α → β → γ
g g' : α → β → γ → δ
s✝ s' : Finset α
t✝ t' : Finset β
u u' : Finset γ
a a' : α
b b' : β
c : γ
f : α → β → γ
s : Finset α
t : Finset β
⊢ ↑(image₂ f s t) = ↑(image₂ (fun a b => f b a) t s)
state_after: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
γ' : Type u_6
δ : Type u_7
δ' : Type u_8
ε : Type u_9
ε' : Type u_10
ζ : Type u_11
ζ' : Type u_12
ν : Type u_13
inst✝⁷ : DecidableEq α'
inst✝⁶ : DecidableEq β'
inst✝⁵ : DecidableEq γ
inst✝⁴ : DecidableEq γ'
inst✝³ : DecidableEq δ
inst✝² : DecidableEq δ'
inst✝¹ : DecidableEq ε
inst✝ : DecidableEq ε'
f✝ f' : α → β → γ
g g' : α → β → γ → δ
s✝ s' : Finset α
t✝ t' : Finset β
u u' : Finset γ
a a' : α
b b' : β
c : γ
f : α → β → γ
s : Finset α
t : Finset β
⊢ image2 f ↑s ↑t = image2 (fun a b => f b a) ↑t ↑s

tactic: exact image2_swap _ _ _
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
γ' : Type u_6
δ : Type u_7
δ' : Type u_8
ε : Type u_9
ε' : Type u_10
ζ : Type u_11
ζ' : Type u_12
ν : Type u_13
inst✝⁷ : DecidableEq α'
inst✝⁶ : DecidableEq β'
inst✝⁵ : DecidableEq γ
inst✝⁴ : DecidableEq γ'
inst✝³ : DecidableEq δ
inst✝² : DecidableEq δ'
inst✝¹ : DecidableEq ε
inst✝ : DecidableEq ε'
f✝ f' : α → β → γ
g g' : α → β → γ → δ
s✝ s' : Finset α
t✝ t' : Finset β
u u' : Finset γ
a a' : α
b b' : β
c : γ
f : α → β → γ
s : Finset α
t : Finset β
⊢ image2 f ↑s ↑t = image2 (fun a b => f b a) ↑t ↑s
state_after: no goals
Theorem: Ordinal.cof_cof
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

tactic: cases' exists_fundamental_sequence a with f hf
state_before: α : Type u_1
r : α → α → Prop
a : Ordinal.{u}
⊢ a.cof.ord.cof = a.cof
state_after: case intro
α : Type u_1
r : α → α → Prop
a : Ordinal.{u}
f : (b : Ordinal.{u}) → b < a.cof.ord → Ordinal.{u}
hf : a.IsFundamentalSequence a.cof.ord f
⊢ a.cof.ord.cof = a.cof

tactic: cases' exists_fundamental_sequence a.cof.ord with g hg
state_before: case intro
α : Type u_1
r : α → α → Prop
a : Ordinal.{u}
f : (b : Ordinal.{u}) → b < a.cof.ord → Ordinal.{u}
hf : a.IsFundamentalSequence a.cof.ord f
⊢ a.cof.ord.cof = a.cof
state_after: case intro.intro
α : Type u_1
r : α → α → Prop
a : Ordinal.{u}
f : (b : Ordinal.{u}) → b < a.cof.ord → Ordinal.{u}
hf : a.IsFundamentalSequence a.cof.ord f
g : (b : Ordinal.{u}) → b < a.cof.ord.cof.ord → Ordinal.{u}
hg : a.cof.ord.IsFundamentalSequence a.cof.ord.cof.ord g
⊢ a.cof.ord.cof = a.cof

tactic: exact ord_injective (hf.trans hg).cof_eq.symm
state_before: case intro.intro
α : Type u_1
r : α → α → Prop
a : Ordinal.{u}
f : (b : Ordinal.{u}) → b < a.cof.ord → Ordinal.{u}
hf : a.IsFundamentalSequence a.cof.ord f
g : (b : Ordinal.{u}) → b < a.cof.ord.cof.ord → Ordinal.{u}
hg : a.cof.ord.IsFundamentalSequence a.cof.ord.cof.ord g
⊢ a.cof.ord.cof = a.cof
state_after: no goals
Theorem: Polynomial.C_mul_X_pow_eq_self
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

tactic: rw [C_mul_X_pow_eq_monomial, monomial_natDegree_leadingCoeff_eq_self h]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
h : p.support.card ≤ 1
⊢ C p.leadingCoeff * X ^ p.natDegree = p
state_after: no goals
Theorem: AddChar.zmodChar_apply'
File: Mathlib/NumberTheory/LegendreSymbol/AddCharacter.lean

tactic: rw [pow_eq_pow_mod a hζ, zmodChar_apply, ZMod.val_natCast a]
state_before: R : Type u
inst✝³ : CommRing R
R' : Type v
inst✝² : CommMonoid R'
C : Type v
inst✝¹ : CommMonoid C
n : ℕ
inst✝ : NeZero n
ζ : C
hζ : ζ ^ n = 1
a : ℕ
⊢ (zmodChar n hζ) ↑a = ζ ^ a
state_after: no goals
Theorem: EMetric.hausdorffEdist_le_of_infEdist
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: simp only [hausdorffEdist_def, sup_le_iff, iSup_le_iff]
state_before: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t u : Set α
Φ : α → β
r : ℝ≥0∞
H1 : ∀ x ∈ s, infEdist x t ≤ r
H2 : ∀ x ∈ t, infEdist x s ≤ r
⊢ hausdorffEdist s t ≤ r
state_after: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t u : Set α
Φ : α → β
r : ℝ≥0∞
H1 : ∀ x ∈ s, infEdist x t ≤ r
H2 : ∀ x ∈ t, infEdist x s ≤ r
⊢ (∀ i ∈ s, infEdist i t ≤ r) ∧ ∀ i ∈ t, infEdist i s ≤ r

tactic: exact ⟨H1, H2⟩
state_before: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t u : Set α
Φ : α → β
r : ℝ≥0∞
H1 : ∀ x ∈ s, infEdist x t ≤ r
H2 : ∀ x ∈ t, infEdist x s ≤ r
⊢ (∀ i ∈ s, infEdist i t ≤ r) ∧ ∀ i ∈ t, infEdist i s ≤ r
state_after: no goals
Theorem: Ring.toSemiring_injective
File: Mathlib/Algebra/Ring/Ext.lean

tactic: intro _ _ h
state_before: R : Type u
⊢ Function.Injective (@toSemiring R)
state_after: R : Type u
a₁✝ a₂✝ : Ring R
h : toSemiring = toSemiring
⊢ a₁✝ = a₂✝

tactic: ext x y
state_before: R : Type u
a₁✝ a₂✝ : Ring R
h : toSemiring = toSemiring
⊢ a₁✝ = a₂✝
state_after: case h_add.h.h
R : Type u
a₁✝ a₂✝ : Ring R
h : toSemiring = toSemiring
x y : R
⊢ x + y = x + y

case h_mul.h.h
R : Type u
a₁✝ a₂✝ : Ring R
h : toSemiring = toSemiring
x y : R
⊢ x * y = x * y
Theorem: Directed.sequence_mono_nat
File: Mathlib/Logic/Encodable/Basic.lean

tactic: dsimp [Directed.sequence]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Encodable α
inst✝ : Inhabited α
r : β → β → Prop
f : α → β
hf : Directed r f
n : ℕ
⊢ r (f (Directed.sequence f hf n)) (f (Directed.sequence f hf (n + 1)))
state_after: α : Type u_1
β : Type u_2
inst✝¹ : Encodable α
inst✝ : Inhabited α
r : β → β → Prop
f : α → β
hf : Directed r f
n : ℕ
⊢ r (f (Directed.sequence f hf n))
    (f
      (match decode n with
      | none => Classical.choose ⋯
      | some a => Classical.choose ⋯))

tactic: generalize hf.sequence f n = p
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Encodable α
inst✝ : Inhabited α
r : β → β → Prop
f : α → β
hf : Directed r f
n : ℕ
⊢ r (f (Directed.sequence f hf n))
    (f
      (match decode n with
      | none => Classical.choose ⋯
      | some a => Classical.choose ⋯))
state_after: α : Type u_1
β : Type u_2
inst✝¹ : Encodable α
inst✝ : Inhabited α
r : β → β → Prop
f : α → β
hf : Directed r f
n : ℕ
p : α
⊢ r (f p)
    (f
      (match decode n with
      | none => Classical.choose ⋯
      | some a => Classical.choose ⋯))

tactic: cases' (decode n : Option α) with a
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Encodable α
inst✝ : Inhabited α
r : β → β → Prop
f : α → β
hf : Directed r f
n : ℕ
p : α
⊢ r (f p)
    (f
      (match decode n with
      | none => Classical.choose ⋯
      | some a => Classical.choose ⋯))
state_after: case none
α : Type u_1
β : Type u_2
inst✝¹ : Encodable α
inst✝ : Inhabited α
r : β → β → Prop
f : α → β
hf : Directed r f
n : ℕ
p : α
⊢ r (f p)
    (f
      (match none with
      | none => Classical.choose ⋯
      | some a => Classical.choose ⋯))

case some
α : Type u_1
β : Type u_2
inst✝¹ : Encodable α
inst✝ : Inhabited α
r : β → β → Prop
f : α → β
hf : Directed r f
n : ℕ
p a : α
⊢ r (f p)
    (f
      (match some a with
      | none => Classical.choose ⋯
      | some a => Classical.choose ⋯))

tactic: exact (Classical.choose_spec (hf p p)).1
state_before: case none
α : Type u_1
β : Type u_2
inst✝¹ : Encodable α
inst✝ : Inhabited α
r : β → β → Prop
f : α → β
hf : Directed r f
n : ℕ
p : α
⊢ r (f p)
    (f
      (match none with
      | none => Classical.choose ⋯
      | some a => Classical.choose ⋯))
state_after: no goals

tactic: exact (Classical.choose_spec (hf p a)).1
state_before: case some
α : Type u_1
β : Type u_2
inst✝¹ : Encodable α
inst✝ : Inhabited α
r : β → β → Prop
f : α → β
hf : Directed r f
n : ℕ
p a : α
⊢ r (f p)
    (f
      (match some a with
      | none => Classical.choose ⋯
      | some a => Classical.choose ⋯))
state_after: no goals