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

tactic: ext
state_before: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
M : Matrix m n α
⊢ M.map id = M
state_after: case a
l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
M : Matrix m n α
i✝ : m
j✝ : n
⊢ M.map id i✝ j✝ = M i✝ j✝

tactic: rfl
state_before: case a
l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
M : Matrix m n α
i✝ : m
j✝ : n
⊢ M.map id i✝ j✝ = M i✝ j✝
state_after: no goals
Theorem: Finset.mem_inf
File: Mathlib/Data/Fintype/Lattice.lean

tactic: induction' s using Finset.cons_induction <;> simp [*]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : Fintype α
s✝ : Finset α
inst✝ : DecidableEq α
s : Finset ι
f : ι → Finset α
a : α
⊢ a ∈ s.inf f ↔ ∀ i ∈ s, a ∈ f i
state_after: no goals
Theorem: IsLocalization.map_comap
File: Mathlib/RingTheory/Localization/Ideal.lean

tactic: obtain ⟨r, s, hx⟩ := mk'_surjective M x
state_before: R : Type u_1
inst✝³ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝² : CommSemiring S
inst✝¹ : Algebra R S
inst✝ : IsLocalization M S
J : Ideal S
x : S
hJ : x ∈ J
⊢ x ∈ Ideal.map (algebraMap R S) (Ideal.comap (algebraMap R S) J)
state_after: case intro.intro
R : Type u_1
inst✝³ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝² : CommSemiring S
inst✝¹ : Algebra R S
inst✝ : IsLocalization M S
J : Ideal S
x : S
hJ : x ∈ J
r : R
s : ↥M
hx : mk' S r s = x
⊢ x ∈ Ideal.map (algebraMap R S) (Ideal.comap (algebraMap R S) J)

tactic: rw [← hx] at hJ ⊢
state_before: case intro.intro
R : Type u_1
inst✝³ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝² : CommSemiring S
inst✝¹ : Algebra R S
inst✝ : IsLocalization M S
J : Ideal S
x : S
hJ : x ∈ J
r : R
s : ↥M
hx : mk' S r s = x
⊢ x ∈ Ideal.map (algebraMap R S) (Ideal.comap (algebraMap R S) J)
state_after: case intro.intro
R : Type u_1
inst✝³ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝² : CommSemiring S
inst✝¹ : Algebra R S
inst✝ : IsLocalization M S
J : Ideal S
x : S
r : R
s : ↥M
hJ : mk' S r s ∈ J
hx : mk' S r s = x
⊢ mk' S r s ∈ Ideal.map (algebraMap R S) (Ideal.comap (algebraMap R S) J)

tactic: exact
  Ideal.mul_mem_right _ _
    (Ideal.mem_map_of_mem _
      (show (algebraMap R S) r ∈ J from
        mk'_spec S r s ▸ J.mul_mem_right ((algebraMap R S) s) hJ))
state_before: case intro.intro
R : Type u_1
inst✝³ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝² : CommSemiring S
inst✝¹ : Algebra R S
inst✝ : IsLocalization M S
J : Ideal S
x : S
r : R
s : ↥M
hJ : mk' S r s ∈ J
hx : mk' S r s = x
⊢ mk' S r s ∈ Ideal.map (algebraMap R S) (Ideal.comap (algebraMap R S) J)
state_after: no goals
Theorem: wbtw_smul_vadd_smul_vadd_of_nonpos_of_nonneg
File: Mathlib/Analysis/Convex/Between.lean

tactic: convert wbtw_smul_vadd_smul_vadd_of_nonneg_of_le (r₁ • v +ᵥ x) v (Left.nonneg_neg_iff.2 hr₁)
    (neg_le_sub_iff_le_add.2 ((le_add_iff_nonneg_left r₁).2 hr₂)) using 1 <;>
  simp [sub_smul, ← add_vadd]
state_before: R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝³ : LinearOrderedField R
inst✝² : AddCommGroup V
inst✝¹ : Module R V
inst✝ : AddTorsor V P
x : P
v : V
r₁ r₂ : R
hr₁ : r₁ ≤ 0
hr₂ : 0 ≤ r₂
⊢ Wbtw R (r₁ • v +ᵥ x) x (r₂ • v +ᵥ x)
state_after: no goals
Theorem: sub_orthogonalProjection_mem_orthogonal
File: Mathlib/Analysis/InnerProductSpace/Projection.lean

tactic: intro w hw
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : _root_.RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : HasOrthogonalProjection K
v : E
⊢ v - ↑((orthogonalProjection K) v) ∈ Kᗮ
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : _root_.RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : HasOrthogonalProjection K
v w : E
hw : w ∈ K
⊢ ⟪w, v - ↑((orthogonalProjection K) v)⟫_𝕜 = 0

tactic: rw [inner_eq_zero_symm]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : _root_.RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : HasOrthogonalProjection K
v w : E
hw : w ∈ K
⊢ ⟪w, v - ↑((orthogonalProjection K) v)⟫_𝕜 = 0
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : _root_.RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : HasOrthogonalProjection K
v w : E
hw : w ∈ K
⊢ ⟪v - ↑((orthogonalProjection K) v), w⟫_𝕜 = 0

tactic: exact orthogonalProjection_inner_eq_zero _ _ hw
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : _root_.RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : HasOrthogonalProjection K
v w : E
hw : w ∈ K
⊢ ⟪v - ↑((orthogonalProjection K) v), w⟫_𝕜 = 0
state_after: no goals
Theorem: Int.ModEq.sub
File: Mathlib/Data/Int/ModEq.lean

tactic: rw [sub_eq_add_neg, sub_eq_add_neg]
state_before: m n a b c d : ℤ
h₁ : a ≡ b [ZMOD n]
h₂ : c ≡ d [ZMOD n]
⊢ a - c ≡ b - d [ZMOD n]
state_after: m n a b c d : ℤ
h₁ : a ≡ b [ZMOD n]
h₂ : c ≡ d [ZMOD n]
⊢ a + -c ≡ b + -d [ZMOD n]

tactic: exact h₁.add h₂.neg
state_before: m n a b c d : ℤ
h₁ : a ≡ b [ZMOD n]
h₂ : c ≡ d [ZMOD n]
⊢ a + -c ≡ b + -d [ZMOD n]
state_after: no goals
Theorem: Polynomial.card_roots_le_map
File: Mathlib/Algebra/Polynomial/Roots.lean

tactic: rw [← p.roots.card_map f]
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
A : Type u_1
B : Type u_2
inst✝³ : CommRing A
inst✝² : CommRing B
inst✝¹ : IsDomain A
inst✝ : IsDomain B
p : A[X]
f : A →+* B
h : map f p ≠ 0
⊢ Multiset.card p.roots ≤ Multiset.card (map f p).roots
state_after: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
A : Type u_1
B : Type u_2
inst✝³ : CommRing A
inst✝² : CommRing B
inst✝¹ : IsDomain A
inst✝ : IsDomain B
p : A[X]
f : A →+* B
h : map f p ≠ 0
⊢ Multiset.card (Multiset.map (⇑f) p.roots) ≤ Multiset.card (map f p).roots

tactic: exact Multiset.card_le_card (map_roots_le h)
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
A : Type u_1
B : Type u_2
inst✝³ : CommRing A
inst✝² : CommRing B
inst✝¹ : IsDomain A
inst✝ : IsDomain B
p : A[X]
f : A →+* B
h : map f p ≠ 0
⊢ Multiset.card (Multiset.map (⇑f) p.roots) ≤ Multiset.card (map f p).roots
state_after: no goals
Theorem: MeasureTheory.integrable_of_norm_sub_le
File: Mathlib/MeasureTheory/Function/L1Space.lean

tactic: apply h.mono
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f₀ f₁ : α → β
g : α → ℝ
hf₁_m : AEStronglyMeasurable f₁ μ
hf₀_i : Integrable f₀ μ
hg_i : Integrable g μ
h : ∀ᵐ (a : α) ∂μ, ‖f₀ a - f₁ a‖ ≤ g a
⊢ ∀ᵐ (a : α) ∂μ, ‖f₁ a‖ ≤ ‖f₀ a‖ + g a
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f₀ f₁ : α → β
g : α → ℝ
hf₁_m : AEStronglyMeasurable f₁ μ
hf₀_i : Integrable f₀ μ
hg_i : Integrable g μ
h : ∀ᵐ (a : α) ∂μ, ‖f₀ a - f₁ a‖ ≤ g a
⊢ ∀ (x : α), ‖f₀ x - f₁ x‖ ≤ g x → ‖f₁ x‖ ≤ ‖f₀ x‖ + g x

tactic: intro a ha
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f₀ f₁ : α → β
g : α → ℝ
hf₁_m : AEStronglyMeasurable f₁ μ
hf₀_i : Integrable f₀ μ
hg_i : Integrable g μ
h : ∀ᵐ (a : α) ∂μ, ‖f₀ a - f₁ a‖ ≤ g a
⊢ ∀ (x : α), ‖f₀ x - f₁ x‖ ≤ g x → ‖f₁ x‖ ≤ ‖f₀ x‖ + g x
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f₀ f₁ : α → β
g : α → ℝ
hf₁_m : AEStronglyMeasurable f₁ μ
hf₀_i : Integrable f₀ μ
hg_i : Integrable g μ
h : ∀ᵐ (a : α) ∂μ, ‖f₀ a - f₁ a‖ ≤ g a
a : α
ha : ‖f₀ a - f₁ a‖ ≤ g a
⊢ ‖f₁ a‖ ≤ ‖f₀ a‖ + g a

tactic: calc
  ‖f₁ a‖ ≤ ‖f₀ a‖ + ‖f₀ a - f₁ a‖ := norm_le_insert _ _
  _ ≤ ‖f₀ a‖ + g a := add_le_add_left ha _
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f₀ f₁ : α → β
g : α → ℝ
hf₁_m : AEStronglyMeasurable f₁ μ
hf₀_i : Integrable f₀ μ
hg_i : Integrable g μ
h : ∀ᵐ (a : α) ∂μ, ‖f₀ a - f₁ a‖ ≤ g a
a : α
ha : ‖f₀ a - f₁ a‖ ≤ g a
⊢ ‖f₁ a‖ ≤ ‖f₀ a‖ + g a
state_after: no goals
Theorem: Real.Angle.sign_neg_coe_nonpos_of_nonneg_of_le_pi
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: rw [sign, sign_nonpos_iff, sin_neg, Left.neg_nonpos_iff]
state_before: θ : ℝ
h0 : 0 ≤ θ
hpi : θ ≤ π
⊢ (-↑θ).sign ≤ 0
state_after: θ : ℝ
h0 : 0 ≤ θ
hpi : θ ≤ π
⊢ 0 ≤ (↑θ).sin

tactic: exact sin_nonneg_of_nonneg_of_le_pi h0 hpi
state_before: θ : ℝ
h0 : 0 ≤ θ
hpi : θ ≤ π
⊢ 0 ≤ (↑θ).sin
state_after: no goals
Theorem: CategoryTheory.transferNatTransSelf_comm
File: Mathlib/CategoryTheory/Adjunction/Mates.lean

tactic: rw [transferNatTransSelf_comp, gf, transferNatTransSelf_id]
state_before: C : Type u₁
D : Type u₂
inst✝¹ : Category.{v₁, u₁} C
inst✝ : Category.{v₂, u₂} D
L₁ L₂ L₃ : C ⥤ D
R₁ R₂ R₃ : D ⥤ C
adj₁ : L₁ ⊣ R₁
adj₂ : L₂ ⊣ R₂
adj₃ : L₃ ⊣ R₃
f : L₂ ⟶ L₁
g : L₁ ⟶ L₂
gf : g ≫ f = 𝟙 L₁
⊢ (transferNatTransSelf adj₁ adj₂) f ≫ (transferNatTransSelf adj₂ adj₁) g = 𝟙 R₁
state_after: no goals
Theorem: UniformCauchySeqOnFilter.mono_right
File: Mathlib/Topology/UniformSpace/UniformConvergence.lean

tactic: simp
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝ : UniformSpace β
F : ι → α → β
f : α → β
s s' : Set α
x : α
p : Filter ι
p' : Filter α
g : ι → α
p'' : Filter α
hf : UniformCauchySeqOnFilter F p p'
hp : p'' ≤ p'
u : Set (β × β)
hu : u ∈ 𝓤 β
this : ∀ᶠ (x : (ι × ι) × α) in (p ×ˢ p) ×ˢ p'', (F x.1.1 x.2, F x.1.2 x.2) ∈ u
⊢ ∀ (x : (ι × ι) × α), (F x.1.1 x.2, F x.1.2 x.2) ∈ u → (F x.1.1 x.2, F x.1.2 x.2) ∈ u
state_after: no goals
Theorem: CochainComplex.HomComplex.Cochain.zero_comp
File: Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean

tactic: ext p q hpq
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
F G K L : CochainComplex C ℤ
n m n₁ n₂ n₁₂ : ℤ
z₂ : Cochain G K n₂
h : n₁ + n₂ = n₁₂
⊢ comp 0 z₂ h = 0
state_after: case h
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
F G K L : CochainComplex C ℤ
n m n₁ n₂ n₁₂ : ℤ
z₂ : Cochain G K n₂
h : n₁ + n₂ = n₁₂
p q : ℤ
hpq : p + n₁₂ = q
⊢ (comp 0 z₂ h).v p q hpq = v 0 p q hpq

tactic: simp only [comp_v _ _ h p _ q rfl (by omega), zero_v, zero_comp]
state_before: case h
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
F G K L : CochainComplex C ℤ
n m n₁ n₂ n₁₂ : ℤ
z₂ : Cochain G K n₂
h : n₁ + n₂ = n₁₂
p q : ℤ
hpq : p + n₁₂ = q
⊢ (comp 0 z₂ h).v p q hpq = v 0 p q hpq
state_after: no goals

tactic: omega
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
F G K L : CochainComplex C ℤ
n m n₁ n₂ n₁₂ : ℤ
z₂ : Cochain G K n₂
h : n₁ + n₂ = n₁₂
p q : ℤ
hpq : p + n₁₂ = q
⊢ p + n₁ + n₂ = q
state_after: no goals
Theorem: round_one
File: Mathlib/Algebra/Order/Floor.lean

tactic: simp [round]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
⊢ round 1 = 1
state_after: no goals
Theorem: ENNReal.toReal_ofReal_eq_iff
File: Mathlib/Data/ENNReal/Basic.lean

tactic: rw [← h]
state_before: α : Type u_1
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ
h : (ENNReal.ofReal a).toReal = a
⊢ 0 ≤ a
state_after: α : Type u_1
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ
h : (ENNReal.ofReal a).toReal = a
⊢ 0 ≤ (ENNReal.ofReal a).toReal

tactic: exact toReal_nonneg
state_before: α : Type u_1
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ
h : (ENNReal.ofReal a).toReal = a
⊢ 0 ≤ (ENNReal.ofReal a).toReal
state_after: no goals
Theorem: List.zipRight_nil_left
File: Mathlib/Data/List/Basic.lean

tactic: cases bs <;> rfl
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
a : α
as : List α
b : β
bs : List β
⊢ [].zipRight bs = map (fun b => (none, b)) bs
state_after: no goals
Theorem: CliffordAlgebra.evenOdd_isCompl
File: Mathlib/LinearAlgebra/CliffordAlgebra/Grading.lean

tactic: have : (Finset.univ : Finset (ZMod 2)) = {0, 1} := rfl
state_before: R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
⊢ Set.univ = {0, 1}
state_after: R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
this : Finset.univ = {0, 1}
⊢ Set.univ = {0, 1}

tactic: simpa using congr_arg ((↑) : Finset (ZMod 2) → Set (ZMod 2)) this
state_before: R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
this : Finset.univ = {0, 1}
⊢ Set.univ = {0, 1}
state_after: no goals
Theorem: exists_succ_iterate_iff_le
File: Mathlib/Order/SuccPred/Basic.lean

tactic: refine ⟨?_, exists_succ_iterate_of_le⟩
state_before: α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : SuccOrder α
inst✝ : IsSuccArchimedean α
a b : α
⊢ (∃ n, succ^[n] a = b) ↔ a ≤ b
state_after: α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : SuccOrder α
inst✝ : IsSuccArchimedean α
a b : α
⊢ (∃ n, succ^[n] a = b) → a ≤ b

tactic: rintro ⟨n, rfl⟩
state_before: α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : SuccOrder α
inst✝ : IsSuccArchimedean α
a b : α
⊢ (∃ n, succ^[n] a = b) → a ≤ b
state_after: case intro
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : SuccOrder α
inst✝ : IsSuccArchimedean α
a : α
n : ℕ
⊢ a ≤ succ^[n] a

tactic: exact id_le_iterate_of_id_le le_succ n a
state_before: case intro
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : SuccOrder α
inst✝ : IsSuccArchimedean α
a : α
n : ℕ
⊢ a ≤ succ^[n] a
state_after: no goals
Theorem: IsSelfAdjoint.algebraMap
File: Mathlib/Algebra/Star/Module.lean

tactic: simpa using congr(algebraMap R A $(hr.star_eq))
state_before: R : Type u_1
A : Type u_2
inst✝⁵ : CommSemiring R
inst✝⁴ : StarRing R
inst✝³ : Semiring A
inst✝² : StarMul A
inst✝¹ : Algebra R A
inst✝ : StarModule R A
r : R
hr : IsSelfAdjoint r
⊢ IsSelfAdjoint ((algebraMap R A) r)
state_after: no goals
Theorem: Finset.prod_range_succ_comm
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

tactic: rw [range_succ, prod_insert not_mem_range_self]
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝ : CommMonoid β
f : ℕ → β
n : ℕ
⊢ ∏ x ∈ range (n + 1), f x = f n * ∏ x ∈ range n, f x
state_after: no goals
Theorem: Computation.bind_pure
File: Mathlib/Data/Seq/Computation.lean

tactic: apply eq_of_bisim fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s
state_before: α : Type u
β : Type v
γ : Type w
f : α → β
s : Computation α
⊢ s.bind (pure ∘ f) = map f s
state_after: case bisim
α : Type u
β : Type v
γ : Type w
f : α → β
s : Computation α
⊢ IsBisimulation fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = s.bind (pure ∘ f) ∧ c₂ = map f s

case r
α : Type u
β : Type v
γ : Type w
f : α → β
s : Computation α
⊢ s.bind (pure ∘ f) = map f s ∨ ∃ s_1, s.bind (pure ∘ f) = s_1.bind (pure ∘ f) ∧ map f s = map f s_1

tactic: intro c₁ c₂ h
state_before: case bisim
α : Type u
β : Type v
γ : Type w
f : α → β
s : Computation α
⊢ IsBisimulation fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = s.bind (pure ∘ f) ∧ c₂ = map f s
state_after: case bisim
α : Type u
β : Type v
γ : Type w
f : α → β
s : Computation α
c₁ c₂ : Computation β
h : c₁ = c₂ ∨ ∃ s, c₁ = s.bind (pure ∘ f) ∧ c₂ = map f s
⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = s.bind (pure ∘ f) ∧ c₂ = map f s) c₁.destruct c₂.destruct

tactic: match c₁, c₂, h with
| _, c₂, Or.inl (Eq.refl _) => cases' destruct c₂ with b cb <;> simp
| _, _, Or.inr ⟨s, rfl, rfl⟩ =>
  apply recOn s <;> intro s <;> simp
  exact Or.inr ⟨s, rfl, rfl⟩
state_before: case bisim
α : Type u
β : Type v
γ : Type w
f : α → β
s : Computation α
c₁ c₂ : Computation β
h : c₁ = c₂ ∨ ∃ s, c₁ = s.bind (pure ∘ f) ∧ c₂ = map f s
⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = s.bind (pure ∘ f) ∧ c₂ = map f s) c₁.destruct c₂.destruct
state_after: no goals

tactic: cases' destruct c₂ with b cb <;> simp
state_before: α : Type u
β : Type v
γ : Type w
f : α → β
s : Computation α
c₁ c₂✝ : Computation β
h : c₁ = c₂✝ ∨ ∃ s, c₁ = s.bind (pure ∘ f) ∧ c₂✝ = map f s
c₂ : Computation β
⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = s.bind (pure ∘ f) ∧ c₂ = map f s) c₂.destruct c₂.destruct
state_after: no goals

tactic: apply recOn s <;> intro s <;> simp
state_before: α : Type u
β : Type v
γ : Type w
f : α → β
s✝ : Computation α
c₁ c₂ : Computation β
h : c₁ = c₂ ∨ ∃ s, c₁ = s.bind (pure ∘ f) ∧ c₂ = map f s
s : Computation α
⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = s.bind (pure ∘ f) ∧ c₂ = map f s) (s.bind (pure ∘ f)).destruct
    (map f s).destruct
state_after: case h2
α : Type u
β : Type v
γ : Type w
f : α → β
s✝¹ : Computation α
c₁ c₂ : Computation β
h : c₁ = c₂ ∨ ∃ s, c₁ = s.bind (pure ∘ f) ∧ c₂ = map f s
s✝ s : Computation α
⊢ s.bind (pure ∘ f) = map f s ∨ ∃ s_1, s.bind (pure ∘ f) = s_1.bind (pure ∘ f) ∧ map f s = map f s_1

tactic: exact Or.inr ⟨s, rfl, rfl⟩
state_before: case h2
α : Type u
β : Type v
γ : Type w
f : α → β
s✝¹ : Computation α
c₁ c₂ : Computation β
h : c₁ = c₂ ∨ ∃ s, c₁ = s.bind (pure ∘ f) ∧ c₂ = map f s
s✝ s : Computation α
⊢ s.bind (pure ∘ f) = map f s ∨ ∃ s_1, s.bind (pure ∘ f) = s_1.bind (pure ∘ f) ∧ map f s = map f s_1
state_after: no goals

tactic: exact Or.inr ⟨s, rfl, rfl⟩
state_before: case r
α : Type u
β : Type v
γ : Type w
f : α → β
s : Computation α
⊢ s.bind (pure ∘ f) = map f s ∨ ∃ s_1, s.bind (pure ∘ f) = s_1.bind (pure ∘ f) ∧ map f s = map f s_1
state_after: no goals
Theorem: AlgebraicGeometry.IsOpenImmersion.range_pullback_to_base_of_left
File: Mathlib/AlgebraicGeometry/OpenImmersion.lean

tactic: rw [pullback.condition, Scheme.comp_val_base, TopCat.coe_comp, Set.range_comp,
  range_pullback_snd_of_left, Opens.carrier_eq_coe, Opens.map_obj, Opens.coe_mk,
  Set.image_preimage_eq_inter_range, Opens.carrier_eq_coe, Scheme.Hom.opensRange_coe]
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y Z : Scheme
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ Set.range ⇑(pullback.fst ≫ f).val.base = Set.range ⇑f.val.base ∩ Set.range ⇑g.val.base
state_after: no goals
Theorem: Batteries.BinaryHeap.size_insert
File: .lake/packages/batteries/Batteries/Data/BinaryHeap.lean

tactic: simp [insert, size, size_heapifyUp]
state_before: α : Type u_1
lt : α → α → Bool
self : BinaryHeap α lt
x : α
⊢ (self.insert x).size = self.size + 1
state_after: no goals
Theorem: Multiset.toFinset_dedup
File: Mathlib/Data/Finset/Basic.lean

tactic: simp_rw [toFinset, dedup_idem]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq α
s t m : Multiset α
⊢ m.dedup.toFinset = m.toFinset
state_after: no goals
Theorem: NNRat.num_ne_zero
File: Mathlib/Data/NNRat/Defs.lean

tactic: simp [num]
state_before: p q : ℚ≥0
⊢ q.num ≠ 0 ↔ q ≠ 0
state_after: no goals
Theorem: Polynomial.toLaurent_C_mul_eq
File: Mathlib/Algebra/Polynomial/Laurent.lean

tactic: simp only [_root_.map_mul, Polynomial.toLaurent_C]
state_before: R : Type u_1
inst✝ : Semiring R
r : R
f : R[X]
⊢ toLaurent (Polynomial.C r * f) = C r * toLaurent f
state_after: no goals
Theorem: add_one_pow_unbounded_of_pos
File: Mathlib/Algebra/Order/Archimedean.lean

tactic: rw [add_comm]
state_before: α : Type u_1
M : Type u_2
inst✝¹ : StrictOrderedSemiring α
inst✝ : Archimedean α
y x : α
hy : 0 < y
this : 0 ≤ 1 + y
n : ℕ
h : x ≤ n • y
⊢ (1 + y) ^ n = (y + 1) ^ n
state_after: no goals
Theorem: Ordinal.mod_one
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: simp only [mod_def, div_one, one_mul, sub_self]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a : Ordinal.{u_4}
⊢ a % 1 = 0
state_after: no goals
Theorem: Complex.arg_eq_neg_pi_div_two_iff
File: Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean

tactic: by_cases h₀ : z = 0
state_before: a x z✝ z : ℂ
⊢ z.arg = -(π / 2) ↔ z.re = 0 ∧ z.im < 0
state_after: case pos
a x z✝ z : ℂ
h₀ : z = 0
⊢ z.arg = -(π / 2) ↔ z.re = 0 ∧ z.im < 0

case neg
a x z✝ z : ℂ
h₀ : ¬z = 0
⊢ z.arg = -(π / 2) ↔ z.re = 0 ∧ z.im < 0

tactic: constructor
state_before: case neg
a x z✝ z : ℂ
h₀ : ¬z = 0
⊢ z.arg = -(π / 2) ↔ z.re = 0 ∧ z.im < 0
state_after: case neg.mp
a x z✝ z : ℂ
h₀ : ¬z = 0
⊢ z.arg = -(π / 2) → z.re = 0 ∧ z.im < 0

case neg.mpr
a x z✝ z : ℂ
h₀ : ¬z = 0
⊢ z.re = 0 ∧ z.im < 0 → z.arg = -(π / 2)

tactic: simp [h₀, lt_irrefl, Real.pi_ne_zero]
state_before: case pos
a x z✝ z : ℂ
h₀ : z = 0
⊢ z.arg = -(π / 2) ↔ z.re = 0 ∧ z.im < 0
state_after: no goals

tactic: intro h
state_before: case neg.mp
a x z✝ z : ℂ
h₀ : ¬z = 0
⊢ z.arg = -(π / 2) → z.re = 0 ∧ z.im < 0
state_after: case neg.mp
a x z✝ z : ℂ
h₀ : ¬z = 0
h : z.arg = -(π / 2)
⊢ z.re = 0 ∧ z.im < 0

tactic: rw [← abs_mul_cos_add_sin_mul_I z, h]
state_before: case neg.mp
a x z✝ z : ℂ
h₀ : ¬z = 0
h : z.arg = -(π / 2)
⊢ z.re = 0 ∧ z.im < 0
state_after: case neg.mp
a x z✝ z : ℂ
h₀ : ¬z = 0
h : z.arg = -(π / 2)
⊢ (↑(abs z) * (cos ↑(-(π / 2)) + sin ↑(-(π / 2)) * I)).re = 0 ∧
    (↑(abs z) * (cos ↑(-(π / 2)) + sin ↑(-(π / 2)) * I)).im < 0

tactic: simp [h₀]
state_before: case neg.mp
a x z✝ z : ℂ
h₀ : ¬z = 0
h : z.arg = -(π / 2)
⊢ (↑(abs z) * (cos ↑(-(π / 2)) + sin ↑(-(π / 2)) * I)).re = 0 ∧
    (↑(abs z) * (cos ↑(-(π / 2)) + sin ↑(-(π / 2)) * I)).im < 0
state_after: no goals

tactic: cases' z with x y
state_before: case neg.mpr
a x z✝ z : ℂ
h₀ : ¬z = 0
⊢ z.re = 0 ∧ z.im < 0 → z.arg = -(π / 2)
state_after: case neg.mpr.mk
a x✝ z : ℂ
x y : ℝ
h₀ : ¬{ re := x, im := y } = 0
⊢ { re := x, im := y }.re = 0 ∧ { re := x, im := y }.im < 0 → { re := x, im := y }.arg = -(π / 2)

tactic: rintro ⟨rfl : x = 0, hy : y < 0⟩
state_before: case neg.mpr.mk
a x✝ z : ℂ
x y : ℝ
h₀ : ¬{ re := x, im := y } = 0
⊢ { re := x, im := y }.re = 0 ∧ { re := x, im := y }.im < 0 → { re := x, im := y }.arg = -(π / 2)
state_after: case neg.mpr.mk.intro
a x z : ℂ
y : ℝ
h₀ : ¬{ re := 0, im := y } = 0
hy : y < 0
⊢ { re := 0, im := y }.arg = -(π / 2)

tactic: rw [← arg_neg_I, ← arg_real_mul (-I) (neg_pos.2 hy), mk_eq_add_mul_I]
state_before: case neg.mpr.mk.intro
a x z : ℂ
y : ℝ
h₀ : ¬{ re := 0, im := y } = 0
hy : y < 0
⊢ { re := 0, im := y }.arg = -(π / 2)
state_after: case neg.mpr.mk.intro
a x z : ℂ
y : ℝ
h₀ : ¬{ re := 0, im := y } = 0
hy : y < 0
⊢ (↑0 + ↑y * I).arg = (↑(-y) * -I).arg

tactic: simp
state_before: case neg.mpr.mk.intro
a x z : ℂ
y : ℝ
h₀ : ¬{ re := 0, im := y } = 0
hy : y < 0
⊢ (↑0 + ↑y * I).arg = (↑(-y) * -I).arg
state_after: no goals
Theorem: Polynomial.natDegree_sum_le
File: Mathlib/Algebra/Polynomial/BigOperators.lean

tactic: simpa using natDegree_multiset_sum_le (s.val.map f)
state_before: R : Type u
ι : Type w
s : Finset ι
S : Type u_1
inst✝ : Semiring S
f : ι → S[X]
⊢ (∑ i ∈ s, f i).natDegree ≤ Finset.fold max 0 (natDegree ∘ f) s
state_after: no goals
Theorem: bot_covBy_iff
File: Mathlib/Order/Atoms.lean

tactic: simp only [CovBy, bot_lt_iff_ne_bot, IsAtom, not_imp_not]
state_before: ι : Sort u_1
α : Type u_2
β : Type u_3
inst✝¹ : PartialOrder α
inst✝ : OrderBot α
a b x : α
⊢ ⊥ ⋖ a ↔ IsAtom a
state_after: no goals
Theorem: Cardinal.mk_Prop
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: simp
state_before: α β : Type u
⊢ #Prop = 2
state_after: no goals