1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Computation.map_id
File: Mathlib/Data/Seq/Computation.lean

tactic: apply Subtype.eq
state_before: α : Type u
β : Type v
γ : Type w
f : Stream' (Option α)
al : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a
⊢ map id ⟨f, al⟩ = ⟨f, al⟩
state_after: case a
α : Type u
β : Type v
γ : Type w
f : Stream' (Option α)
al : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a
⊢ ↑(map id ⟨f, al⟩) = ↑⟨f, al⟩

tactic: simp only [map, comp_apply, id_eq]
state_before: case a
α : Type u
β : Type v
γ : Type w
f : Stream' (Option α)
al : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a
⊢ ↑(map id ⟨f, al⟩) = ↑⟨f, al⟩
state_after: case a
α : Type u
β : Type v
γ : Type w
f : Stream' (Option α)
al : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a
⊢ Stream'.map (fun o => Option.rec none (fun val => some val) o) f = f

tactic: have e : @Option.rec α (fun _ => Option α) none some = id := by ext ⟨⟩ <;> rfl
state_before: case a
α : Type u
β : Type v
γ : Type w
f : Stream' (Option α)
al : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a
⊢ Stream'.map (fun o => Option.rec none (fun val => some val) o) f = f
state_after: case a
α : Type u
β : Type v
γ : Type w
f : Stream' (Option α)
al : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a
e : Option.rec none some = id
⊢ Stream'.map (fun o => Option.rec none (fun val => some val) o) f = f

tactic: have h : ((fun x: Option α => x) = id) := rfl
state_before: case a
α : Type u
β : Type v
γ : Type w
f : Stream' (Option α)
al : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a
e : Option.rec none some = id
⊢ Stream'.map (fun o => Option.rec none (fun val => some val) o) f = f
state_after: case a
α : Type u
β : Type v
γ : Type w
f : Stream' (Option α)
al : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a
e : Option.rec none some = id
h : (fun x => x) = id
⊢ Stream'.map (fun o => Option.rec none (fun val => some val) o) f = f

tactic: simp [e, h, Stream'.map_id]
state_before: case a
α : Type u
β : Type v
γ : Type w
f : Stream' (Option α)
al : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a
e : Option.rec none some = id
h : (fun x => x) = id
⊢ Stream'.map (fun o => Option.rec none (fun val => some val) o) f = f
state_after: no goals

tactic: ext ⟨⟩ <;> rfl
state_before: α : Type u
β : Type v
γ : Type w
f : Stream' (Option α)
al : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a
⊢ Option.rec none some = id
state_after: no goals
Theorem: Matrix.zpow_add_one_of_ne_neg_one
File: Mathlib/LinearAlgebra/Matrix/ZPow.lean

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

tactic: rcases nonsing_inv_cancel_or_zero A with (⟨h, _⟩ | h)
state_before: n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A : M
n : ℕ
x✝ : -(↑n + 2) ≠ -1
⊢ A ^ (-(↑n + 2) + 1) = A ^ (-(↑n + 2)) * A
state_after: case inl.intro
n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A : M
n : ℕ
x✝ : -(↑n + 2) ≠ -1
h : A⁻¹ * A = 1
right✝ : A * A⁻¹ = 1
⊢ A ^ (-(↑n + 2) + 1) = A ^ (-(↑n + 2)) * A

case inr
n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A : M
n : ℕ
x✝ : -(↑n + 2) ≠ -1
h : A⁻¹ = 0
⊢ A ^ (-(↑n + 2) + 1) = A ^ (-(↑n + 2)) * A

tactic: apply zpow_add_one (isUnit_det_of_left_inverse h)
state_before: case inl.intro
n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A : M
n : ℕ
x✝ : -(↑n + 2) ≠ -1
h : A⁻¹ * A = 1
right✝ : A * A⁻¹ = 1
⊢ A ^ (-(↑n + 2) + 1) = A ^ (-(↑n + 2)) * A
state_after: no goals

tactic: show A ^ (-((n + 1 : ℕ) : ℤ)) = A ^ (-((n + 2 : ℕ) : ℤ)) * A
state_before: case inr
n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A : M
n : ℕ
x✝ : -(↑n + 2) ≠ -1
h : A⁻¹ = 0
⊢ A ^ (-(↑n + 2) + 1) = A ^ (-(↑n + 2)) * A
state_after: case inr
n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A : M
n : ℕ
x✝ : -(↑n + 2) ≠ -1
h : A⁻¹ = 0
⊢ A ^ (-↑(n + 1)) = A ^ (-↑(n + 2)) * A

tactic: simp_rw [zpow_neg_natCast, ← inv_pow', h, zero_pow $ Nat.succ_ne_zero _, zero_mul]
state_before: case inr
n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A : M
n : ℕ
x✝ : -(↑n + 2) ≠ -1
h : A⁻¹ = 0
⊢ A ^ (-↑(n + 1)) = A ^ (-↑(n + 2)) * A
state_after: no goals
Theorem: Ideal.isCoprime_iff_gcd
File: Mathlib/RingTheory/DedekindDomain/Ideal.lean

tactic: rw [Ideal.isCoprime_iff_codisjoint, codisjoint_iff, one_eq_top, gcd_eq_sup]
state_before: R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Field K
inst✝² : IsDedekindDomain A
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
I J : Ideal A
⊢ IsCoprime I J ↔ gcd I J = 1
state_after: no goals
Theorem: Int.testBit_bit_succ
File: Mathlib/Data/Int/Bitwise.lean

tactic: rw [bit_coe_nat]
state_before: m : ℕ
b : Bool
n : ℕ
⊢ (bit b ↑n).testBit m.succ = (↑n).testBit m
state_after: m : ℕ
b : Bool
n : ℕ
⊢ (↑(Nat.bit b n)).testBit m.succ = (↑n).testBit m

tactic: apply Nat.testBit_bit_succ
state_before: m : ℕ
b : Bool
n : ℕ
⊢ (↑(Nat.bit b n)).testBit m.succ = (↑n).testBit m
state_after: no goals

tactic: dsimp only [testBit]
state_before: m : ℕ
b : Bool
n : ℕ
⊢ (bit b -[n+1]).testBit m.succ = -[n+1].testBit m
state_after: m : ℕ
b : Bool
n : ℕ
⊢ (match bit b -[n+1], m.succ with
    | ofNat m, n => m.testBit n
    | -[m+1], n => !m.testBit n) =
    !n.testBit m

tactic: simp only [bit_negSucc]
state_before: m : ℕ
b : Bool
n : ℕ
⊢ (match bit b -[n+1], m.succ with
    | ofNat m, n => m.testBit n
    | -[m+1], n => !m.testBit n) =
    !n.testBit m
state_after: m : ℕ
b : Bool
n : ℕ
⊢ (!(Nat.bit (!b) n).testBit m.succ) = !n.testBit m

tactic: cases b <;> simp only [Bool.not_false, Bool.not_true, Nat.testBit_bit_succ]
state_before: m : ℕ
b : Bool
n : ℕ
⊢ (!(Nat.bit (!b) n).testBit m.succ) = !n.testBit m
state_after: no goals
Theorem: List.map_reverse_tails
File: Mathlib/Data/List/Infix.lean

tactic: rw [tails_eq_inits l]
state_before: α : Type u_1
β : Type u_2
l✝ l₁ l₂ l₃ : List α
a b : α
m n : ℕ
l : List α
⊢ map reverse l.tails = l.reverse.inits.reverse
state_after: α : Type u_1
β : Type u_2
l✝ l₁ l₂ l₃ : List α
a b : α
m n : ℕ
l : List α
⊢ map reverse (map reverse l.reverse.inits).reverse = l.reverse.inits.reverse

tactic: simp [reverse_involutive.comp_self, ← map_reverse]
state_before: α : Type u_1
β : Type u_2
l✝ l₁ l₂ l₃ : List α
a b : α
m n : ℕ
l : List α
⊢ map reverse (map reverse l.reverse.inits).reverse = l.reverse.inits.reverse
state_after: no goals
Theorem: Equiv.permCongr_trans
File: Mathlib/Logic/Equiv/Defs.lean

tactic: ext
state_before: α : Sort u
β : Sort v
γ : Sort w
α' : Type u_1
β' : Type u_2
e : α' ≃ β'
p p' : Perm α'
⊢ Equiv.trans (e.permCongr p) (e.permCongr p') = e.permCongr (Equiv.trans p p')
state_after: case H
α : Sort u
β : Sort v
γ : Sort w
α' : Type u_1
β' : Type u_2
e : α' ≃ β'
p p' : Perm α'
x✝ : β'
⊢ (Equiv.trans (e.permCongr p) (e.permCongr p')) x✝ = (e.permCongr (Equiv.trans p p')) x✝

tactic: simp only [trans_apply, comp_apply, permCongr_apply, symm_apply_apply]
state_before: case H
α : Sort u
β : Sort v
γ : Sort w
α' : Type u_1
β' : Type u_2
e : α' ≃ β'
p p' : Perm α'
x✝ : β'
⊢ (Equiv.trans (e.permCongr p) (e.permCongr p')) x✝ = (e.permCongr (Equiv.trans p p')) x✝
state_after: no goals
Theorem: Nat.shiftLeft'_tt_eq_mul_pow
File: Mathlib/Data/Nat/Size.lean

tactic: simp [shiftLeft', pow_zero, Nat.one_mul]
state_before: m : ℕ
⊢ shiftLeft' true m 0 + 1 = (m + 1) * 2 ^ 0
state_after: no goals

tactic: change bit1 (shiftLeft' true m k) + 1 = (m + 1) * (2 ^ k * 2)
state_before: m k : ℕ
⊢ shiftLeft' true m (k + 1) + 1 = (m + 1) * 2 ^ (k + 1)
state_after: m k : ℕ
⊢ bit1 (shiftLeft' true m k) + 1 = (m + 1) * (2 ^ k * 2)

tactic: rw [bit1_val]
state_before: m k : ℕ
⊢ bit1 (shiftLeft' true m k) + 1 = (m + 1) * (2 ^ k * 2)
state_after: m k : ℕ
⊢ 2 * shiftLeft' true m k + 1 + 1 = (m + 1) * (2 ^ k * 2)

tactic: change 2 * (shiftLeft' true m k + 1) = _
state_before: m k : ℕ
⊢ 2 * shiftLeft' true m k + 1 + 1 = (m + 1) * (2 ^ k * 2)
state_after: m k : ℕ
⊢ 2 * (shiftLeft' true m k + 1) = (m + 1) * (2 ^ k * 2)

tactic: rw [shiftLeft'_tt_eq_mul_pow m k, mul_left_comm, mul_comm 2]
state_before: m k : ℕ
⊢ 2 * (shiftLeft' true m k + 1) = (m + 1) * (2 ^ k * 2)
state_after: no goals
Theorem: Algebra.discr_eq_discr_of_algEquiv
File: Mathlib/RingTheory/Discriminant.lean

tactic: rw [discr_def]
state_before: A : Type u
B : Type v
C : Type z
ι : Type w
inst✝⁶ : DecidableEq ι
inst✝⁵ : CommRing A
inst✝⁴ : CommRing B
inst✝³ : Algebra A B
inst✝² : CommRing C
inst✝¹ : Algebra A C
inst✝ : Fintype ι
b : ι → B
f : B ≃ₐ[A] C
⊢ discr A b = discr A (⇑f ∘ b)
state_after: A : Type u
B : Type v
C : Type z
ι : Type w
inst✝⁶ : DecidableEq ι
inst✝⁵ : CommRing A
inst✝⁴ : CommRing B
inst✝³ : Algebra A B
inst✝² : CommRing C
inst✝¹ : Algebra A C
inst✝ : Fintype ι
b : ι → B
f : B ≃ₐ[A] C
⊢ (traceMatrix A b).det = discr A (⇑f ∘ b)

tactic: congr
state_before: A : Type u
B : Type v
C : Type z
ι : Type w
inst✝⁶ : DecidableEq ι
inst✝⁵ : CommRing A
inst✝⁴ : CommRing B
inst✝³ : Algebra A B
inst✝² : CommRing C
inst✝¹ : Algebra A C
inst✝ : Fintype ι
b : ι → B
f : B ≃ₐ[A] C
⊢ (traceMatrix A b).det = discr A (⇑f ∘ b)
state_after: case e_M
A : Type u
B : Type v
C : Type z
ι : Type w
inst✝⁶ : DecidableEq ι
inst✝⁵ : CommRing A
inst✝⁴ : CommRing B
inst✝³ : Algebra A B
inst✝² : CommRing C
inst✝¹ : Algebra A C
inst✝ : Fintype ι
b : ι → B
f : B ≃ₐ[A] C
⊢ traceMatrix A b = traceMatrix A (⇑f ∘ b)

tactic: ext
state_before: case e_M
A : Type u
B : Type v
C : Type z
ι : Type w
inst✝⁶ : DecidableEq ι
inst✝⁵ : CommRing A
inst✝⁴ : CommRing B
inst✝³ : Algebra A B
inst✝² : CommRing C
inst✝¹ : Algebra A C
inst✝ : Fintype ι
b : ι → B
f : B ≃ₐ[A] C
⊢ traceMatrix A b = traceMatrix A (⇑f ∘ b)
state_after: case e_M.a
A : Type u
B : Type v
C : Type z
ι : Type w
inst✝⁶ : DecidableEq ι
inst✝⁵ : CommRing A
inst✝⁴ : CommRing B
inst✝³ : Algebra A B
inst✝² : CommRing C
inst✝¹ : Algebra A C
inst✝ : Fintype ι
b : ι → B
f : B ≃ₐ[A] C
i✝ j✝ : ι
⊢ traceMatrix A b i✝ j✝ = traceMatrix A (⇑f ∘ b) i✝ j✝

tactic: simp_rw [traceMatrix_apply, traceForm_apply, Function.comp, ← map_mul f, trace_eq_of_algEquiv]
state_before: case e_M.a
A : Type u
B : Type v
C : Type z
ι : Type w
inst✝⁶ : DecidableEq ι
inst✝⁵ : CommRing A
inst✝⁴ : CommRing B
inst✝³ : Algebra A B
inst✝² : CommRing C
inst✝¹ : Algebra A C
inst✝ : Fintype ι
b : ι → B
f : B ≃ₐ[A] C
i✝ j✝ : ι
⊢ traceMatrix A b i✝ j✝ = traceMatrix A (⇑f ∘ b) i✝ j✝
state_after: no goals
Theorem: Finset.exists_mem_insert
File: Mathlib/Data/Finset/Basic.lean

tactic: simp only [mem_insert, or_and_right, exists_or, exists_eq_left]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq α
a : α
s : Finset α
p : α → Prop
⊢ (∃ x ∈ insert a s, p x) ↔ p a ∨ ∃ x ∈ s, p x
state_after: no goals
Theorem: AffineSubspace.vadd_mem_iff_mem_direction
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

tactic: simpa using vsub_mem_direction h hp
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : AffineSubspace k P
v : V
p : P
hp : p ∈ s
h : v +ᵥ p ∈ s
⊢ v ∈ s.direction
state_after: no goals
Theorem: AlgebraicTopology.DoldKan.Q_f_naturality
File: Mathlib/AlgebraicTopology/DoldKan/Projections.lean

tactic: simp only [Q, HomologicalComplex.sub_f_apply, HomologicalComplex.id_f, comp_sub, P_f_naturality,
  sub_comp, sub_left_inj]
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n : ℕ
X Y : SimplicialObject C
f : X ⟶ Y
⊢ f.app { unop := [n] } ≫ (Q q).f n = (Q q).f n ≫ f.app { unop := [n] }
state_after: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n : ℕ
X Y : SimplicialObject C
f : X ⟶ Y
⊢ f.app { unop := [n] } ≫ 𝟙 (K[Y].X n) = 𝟙 (K[X].X n) ≫ f.app { unop := [n] }

tactic: dsimp
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n : ℕ
X Y : SimplicialObject C
f : X ⟶ Y
⊢ f.app { unop := [n] } ≫ 𝟙 (K[Y].X n) = 𝟙 (K[X].X n) ≫ f.app { unop := [n] }
state_after: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n : ℕ
X Y : SimplicialObject C
f : X ⟶ Y
⊢ f.app { unop := [n] } ≫ 𝟙 (Y _[n]) = 𝟙 (X _[n]) ≫ f.app { unop := [n] }

tactic: simp only [comp_id, id_comp]
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n : ℕ
X Y : SimplicialObject C
f : X ⟶ Y
⊢ f.app { unop := [n] } ≫ 𝟙 (Y _[n]) = 𝟙 (X _[n]) ≫ f.app { unop := [n] }
state_after: no goals
Theorem: DilationEquiv.ratio_symm
File: Mathlib/Topology/MetricSpace/DilationEquiv.lean

tactic: rw [← ratio_trans, symm_trans_self, ratio_refl]
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : PseudoEMetricSpace X
inst✝¹ : PseudoEMetricSpace Y
inst✝ : PseudoEMetricSpace Z
e : X ≃ᵈ Y
⊢ ratio e.symm * ratio e = 1
state_after: no goals
Theorem: TensorAlgebra.ι_leftInverse
File: Mathlib/LinearAlgebra/TensorAlgebra/Basic.lean

tactic: simp [ιInv]
state_before: R : Type u_1
inst✝² : CommSemiring R
M : Type u_2
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
x : M
⊢ ιInv ((ι R) x) = x
state_after: no goals
Theorem: MeasureTheory.tilted_zero_measure
File: Mathlib/MeasureTheory/Measure/Tilted.lean

tactic: simp [Measure.tilted]
state_before: α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ f : α → ℝ
⊢ Measure.tilted 0 f = 0
state_after: no goals
Theorem: MeasureTheory.measure_eq_iInf'
File: Mathlib/MeasureTheory/Measure/MeasureSpaceDef.lean

tactic: simp_rw [iInf_subtype, iInf_and, ← measure_eq_iInf]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
inst✝ : MeasurableSpace α
μ✝ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t : Set α
μ : Measure α
s : Set α
⊢ μ s = ⨅ t, μ ↑t
state_after: no goals
Theorem: Finset.filter_cons
File: Mathlib/Data/Finset/Basic.lean

tactic: split_ifs
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
s✝ : Finset α
a : α
s : Finset α
ha : a ∉ s
⊢ _root_.Disjoint (if p a then {a} else ∅) (filter p s)
state_after: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
s✝ : Finset α
a : α
s : Finset α
ha : a ∉ s
h✝ : p a
⊢ _root_.Disjoint {a} (filter p s)

case neg
α : Type u_1
β : Type u_2
γ : Type u_3
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
s✝ : Finset α
a : α
s : Finset α
ha : a ∉ s
h✝ : ¬p a
⊢ _root_.Disjoint ∅ (filter p s)

tactic: rw [disjoint_singleton_left]
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
s✝ : Finset α
a : α
s : Finset α
ha : a ∉ s
h✝ : p a
⊢ _root_.Disjoint {a} (filter p s)
state_after: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
s✝ : Finset α
a : α
s : Finset α
ha : a ∉ s
h✝ : p a
⊢ a ∉ filter p s

tactic: exact mem_filter.not.mpr <| mt And.left ha
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
s✝ : Finset α
a : α
s : Finset α
ha : a ∉ s
h✝ : p a
⊢ a ∉ filter p s
state_after: no goals

tactic: exact disjoint_empty_left _
state_before: case neg
α : Type u_1
β : Type u_2
γ : Type u_3
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
s✝ : Finset α
a : α
s : Finset α
ha : a ∉ s
h✝ : ¬p a
⊢ _root_.Disjoint ∅ (filter p s)
state_after: no goals

tactic: split_ifs with h
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
s✝ : Finset α
a : α
s : Finset α
ha : a ∉ s
⊢ filter p (cons a s ha) = (if p a then {a} else ∅).disjUnion (filter p s) ⋯
state_after: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
s✝ : Finset α
a : α
s : Finset α
ha : a ∉ s
h : p a
⊢ filter p (cons a s ha) = {a}.disjUnion (filter p s) ⋯

case neg
α : Type u_1
β : Type u_2
γ : Type u_3
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
s✝ : Finset α
a : α
s : Finset α
ha : a ∉ s
h : ¬p a
⊢ filter p (cons a s ha) = ∅.disjUnion (filter p s) ⋯

tactic: rw [filter_cons_of_pos _ _ _ ha h, singleton_disjUnion]
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
s✝ : Finset α
a : α
s : Finset α
ha : a ∉ s
h : p a
⊢ filter p (cons a s ha) = {a}.disjUnion (filter p s) ⋯
state_after: no goals

tactic: rw [filter_cons_of_neg _ _ _ ha h, empty_disjUnion]
state_before: case neg
α : Type u_1
β : Type u_2
γ : Type u_3
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
s✝ : Finset α
a : α
s : Finset α
ha : a ∉ s
h : ¬p a
⊢ filter p (cons a s ha) = ∅.disjUnion (filter p s) ⋯
state_after: no goals
Theorem: NNReal.sqrt_eq_rpow
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

tactic: refine NNReal.eq ?_
state_before: w x✝ y z : ℝ
x : ℝ≥0
⊢ sqrt x = x ^ (1 / 2)
state_after: w x✝ y z : ℝ
x : ℝ≥0
⊢ ↑(sqrt x) = ↑(x ^ (1 / 2))

tactic: push_cast
state_before: w x✝ y z : ℝ
x : ℝ≥0
⊢ ↑(sqrt x) = ↑(x ^ (1 / 2))
state_after: w x✝ y z : ℝ
x : ℝ≥0
⊢ √↑x = ↑x ^ (1 / 2)

tactic: exact Real.sqrt_eq_rpow x.1
state_before: w x✝ y z : ℝ
x : ℝ≥0
⊢ √↑x = ↑x ^ (1 / 2)
state_after: no goals
Theorem: Nat.one_lt_mul_iff
File: Mathlib/Data/Nat/Defs.lean

tactic: constructor <;> intro h
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
⊢ 1 < m * n ↔ 0 < m ∧ 0 < n ∧ (1 < m ∨ 1 < n)
state_after: case mp
a b c d m n k : ℕ
p q : ℕ → Prop
h : 1 < m * n
⊢ 0 < m ∧ 0 < n ∧ (1 < m ∨ 1 < n)

case mpr
a b c d m n k : ℕ
p q : ℕ → Prop
h : 0 < m ∧ 0 < n ∧ (1 < m ∨ 1 < n)
⊢ 1 < m * n

tactic: by_contra h'
state_before: case mp
a b c d m n k : ℕ
p q : ℕ → Prop
h : 1 < m * n
⊢ 0 < m ∧ 0 < n ∧ (1 < m ∨ 1 < n)
state_after: case mp
a b c d m n k : ℕ
p q : ℕ → Prop
h : 1 < m * n
h' : ¬(0 < m ∧ 0 < n ∧ (1 < m ∨ 1 < n))
⊢ False

tactic: push_neg at h'
state_before: case mp
a b c d m n k : ℕ
p q : ℕ → Prop
h : 1 < m * n
h' : ¬(0 < m ∧ 0 < n ∧ (1 < m ∨ 1 < n))
⊢ False
state_after: case mp
a b c d m n k : ℕ
p q : ℕ → Prop
h : 1 < m * n
h' : m ≤ 0 ∨ n ≤ 0 ∨ m ≤ 1 ∧ n ≤ 1
⊢ False

tactic: simp [Nat.le_zero] at h'
state_before: case mp
a b c d m n k : ℕ
p q : ℕ → Prop
h : 1 < m * n
h' : m ≤ 0 ∨ n ≤ 0 ∨ m ≤ 1 ∧ n ≤ 1
⊢ False
state_after: case mp
a b c d m n k : ℕ
p q : ℕ → Prop
h : 1 < m * n
h' : m = 0 ∨ n = 0 ∨ m ≤ 1 ∧ n ≤ 1
⊢ False

tactic: obtain rfl | rfl | h' := h'
state_before: case mp
a b c d m n k : ℕ
p q : ℕ → Prop
h : 1 < m * n
h' : m = 0 ∨ n = 0 ∨ m ≤ 1 ∧ n ≤ 1
⊢ False
state_after: case mp.inl
a b c d n k : ℕ
p q : ℕ → Prop
h : 1 < 0 * n
⊢ False

case mp.inr.inl
a b c d m k : ℕ
p q : ℕ → Prop
h : 1 < m * 0
⊢ False

case mp.inr.inr
a b c d m n k : ℕ
p q : ℕ → Prop
h : 1 < m * n
h' : m ≤ 1 ∧ n ≤ 1
⊢ False

tactic: simp at h
state_before: case mp.inl
a b c d n k : ℕ
p q : ℕ → Prop
h : 1 < 0 * n
⊢ False
state_after: no goals

tactic: simp at h
state_before: case mp.inr.inl
a b c d m k : ℕ
p q : ℕ → Prop
h : 1 < m * 0
⊢ False
state_after: no goals

tactic: exact Nat.not_lt_of_le (Nat.mul_le_mul h'.1 h'.2) h
state_before: case mp.inr.inr
a b c d m n k : ℕ
p q : ℕ → Prop
h : 1 < m * n
h' : m ≤ 1 ∧ n ≤ 1
⊢ False
state_after: no goals

tactic: obtain hm | hn := h.2.2
state_before: case mpr
a b c d m n k : ℕ
p q : ℕ → Prop
h : 0 < m ∧ 0 < n ∧ (1 < m ∨ 1 < n)
⊢ 1 < m * n
state_after: case mpr.inl
a b c d m n k : ℕ
p q : ℕ → Prop
h : 0 < m ∧ 0 < n ∧ (1 < m ∨ 1 < n)
hm : 1 < m
⊢ 1 < m * n

case mpr.inr
a b c d m n k : ℕ
p q : ℕ → Prop
h : 0 < m ∧ 0 < n ∧ (1 < m ∨ 1 < n)
hn : 1 < n
⊢ 1 < m * n

tactic: exact Nat.mul_lt_mul_of_lt_of_le' hm h.2.1 Nat.zero_lt_one
state_before: case mpr.inl
a b c d m n k : ℕ
p q : ℕ → Prop
h : 0 < m ∧ 0 < n ∧ (1 < m ∨ 1 < n)
hm : 1 < m
⊢ 1 < m * n
state_after: no goals

tactic: exact Nat.mul_lt_mul_of_le_of_lt h.1 hn h.1
state_before: case mpr.inr
a b c d m n k : ℕ
p q : ℕ → Prop
h : 0 < m ∧ 0 < n ∧ (1 < m ∨ 1 < n)
hn : 1 < n
⊢ 1 < m * n
state_after: no goals
Theorem: EReal.range_coe
File: Mathlib/Data/Real/EReal.lean

tactic: ext x
state_before: ⊢ range Real.toEReal = {⊥, ⊤}ᶜ
state_after: case h
x : EReal
⊢ x ∈ range Real.toEReal ↔ x ∈ {⊥, ⊤}ᶜ

tactic: induction x <;> simp
state_before: case h
x : EReal
⊢ x ∈ range Real.toEReal ↔ x ∈ {⊥, ⊤}ᶜ
state_after: no goals
Theorem: Pell.xn_modEq_x2n_sub
File: Mathlib/NumberTheory/PellMatiyasevic.lean

tactic: have : 2 * n - j + j ≤ n + j := by
  rw [tsub_add_cancel_of_le h, two_mul]; exact Nat.add_le_add_left jn _
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
h : j ≤ 2 * n
jn : n ≤ j
⊢ xn a1 (2 * n - j) + xn a1 j ≡ 0 [MOD xn a1 n]
state_after: a : ℕ
a1 : 1 < a
n j : ℕ
h : j ≤ 2 * n
jn : n ≤ j
this : 2 * n - j + j ≤ n + j
⊢ xn a1 (2 * n - j) + xn a1 j ≡ 0 [MOD xn a1 n]

tactic: let t := xn_modEq_x2n_sub_lem a1 (Nat.le_of_add_le_add_right this)
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
h : j ≤ 2 * n
jn : n ≤ j
this : 2 * n - j + j ≤ n + j
⊢ xn a1 (2 * n - j) + xn a1 j ≡ 0 [MOD xn a1 n]
state_after: a : ℕ
a1 : 1 < a
n j : ℕ
h : j ≤ 2 * n
jn : n ≤ j
this : 2 * n - j + j ≤ n + j
t : xn a1 (2 * n - (2 * n - j)) + xn a1 (2 * n - j) ≡ 0 [MOD xn a1 n] :=
  xn_modEq_x2n_sub_lem a1 (Nat.le_of_add_le_add_right this)
⊢ xn a1 (2 * n - j) + xn a1 j ≡ 0 [MOD xn a1 n]

tactic: rwa [tsub_tsub_cancel_of_le h, add_comm] at t
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
h : j ≤ 2 * n
jn : n ≤ j
this : 2 * n - j + j ≤ n + j
t : xn a1 (2 * n - (2 * n - j)) + xn a1 (2 * n - j) ≡ 0 [MOD xn a1 n] :=
  xn_modEq_x2n_sub_lem a1 (Nat.le_of_add_le_add_right this)
⊢ xn a1 (2 * n - j) + xn a1 j ≡ 0 [MOD xn a1 n]
state_after: no goals

tactic: rw [tsub_add_cancel_of_le h, two_mul]
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
h : j ≤ 2 * n
jn : n ≤ j
⊢ 2 * n - j + j ≤ n + j
state_after: a : ℕ
a1 : 1 < a
n j : ℕ
h : j ≤ 2 * n
jn : n ≤ j
⊢ n + n ≤ n + j

tactic: exact Nat.add_le_add_left jn _
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
h : j ≤ 2 * n
jn : n ≤ j
⊢ n + n ≤ n + j
state_after: no goals
Theorem: Matrix.charpoly_fromBlocks_zero₁₂
File: Mathlib/LinearAlgebra/Matrix/Charpoly/Basic.lean

tactic: simp only [charpoly, charmatrix_fromBlocks, Matrix.map_zero _ (Polynomial.C_0), neg_zero,
  det_fromBlocks_zero₁₂]
state_before: R : Type u_1
S : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
m : Type u_3
n : Type u_4
inst✝³ : DecidableEq m
inst✝² : DecidableEq n
inst✝¹ : Fintype m
inst✝ : Fintype n
M₁₁ : Matrix m m R
M₁₂ : Matrix m n R
M₂₁ : Matrix n m R
M₂₂ M : Matrix n n R
i j : n
⊢ (fromBlocks M₁₁ 0 M₂₁ M₂₂).charpoly = M₁₁.charpoly * M₂₂.charpoly
state_after: no goals
Theorem: WithTop.sum_lt_top_iff
File: Mathlib/Algebra/BigOperators/WithTop.lean

tactic: simp only [WithTop.lt_top_iff_ne_top, ne_eq, sum_eq_top_iff, not_exists, not_and]
state_before: ι : Type u_1
α : Type u_2
inst✝¹ : AddCommMonoid α
inst✝ : LT α
s : Finset ι
f : ι → WithTop α
⊢ ∑ i ∈ s, f i < ⊤ ↔ ∀ i ∈ s, f i < ⊤
state_after: no goals
Theorem: Part.eq_none_iff
File: Mathlib/Data/Part.lean

tactic: simpa
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
o : Part α
h : ∀ (a : α), a ∉ o
⊢ ∀ (a : α), a ∈ o ↔ a ∈ none
state_after: no goals