tasksource/leandojo huggingface dataset:
Theorem: Zsqrtd.sqLe_mul
File: Mathlib/NumberTheory/Zsqrtd/Basic.lean

tactic: intro xy zw
state_before: case refine'_4
d✝ : ℤ
d x y z w : ℕ
⊢ SqLe y d x 1 → SqLe w d z 1 → SqLe (x * w + y * z) d (x * z + d * y * w) 1

tactic: have :=
  Int.mul_nonneg (sub_nonneg_of_le (Int.ofNat_le_ofNat_of_le xy))
    (sub_nonneg_of_le (Int.ofNat_le_ofNat_of_le zw))
state_before: case refine'_4
d✝ : ℤ
d x y z w : ℕ
xy : SqLe y d x 1
zw : SqLe w d z 1
⊢ SqLe (x * w + y * z) d (x * z + d * y * w) 1

tactic: refine' Int.le_of_ofNat_le_ofNat (le_of_sub_nonneg _)
state_before: case refine'_4
d✝ : ℤ
d x y z w : ℕ
xy : SqLe y d x 1
zw : SqLe w d z 1
this : 0 ≤ (↑(1 * x * x) - ↑(d * y * y)) * (↑(1 * z * z) - ↑(d * w * w))
⊢ SqLe (x * w + y * z) d (x * z + d * y * w) 1

tactic: convert this using 1
state_before: case refine'_4
d✝ : ℤ
d x y z w : ℕ
xy : SqLe y d x 1
zw : SqLe w d z 1
this : 0 ≤ (↑(1 * x * x) - ↑(d * y * y)) * (↑(1 * z * z) - ↑(d * w * w))
⊢ 0 ≤ ↑(1 * (x * z + d * y * w) * (x * z + d * y * w)) - ↑(d * (x * w + y * z) * (x * w + y * z))

tactic: simp only [one_mul, Int.ofNat_add, Int.ofNat_mul]
state_before: case h.e'_4
d✝ : ℤ
d x y z w : ℕ
xy : SqLe y d x 1
zw : SqLe w d z 1
this : 0 ≤ (↑(1 * x * x) - ↑(d * y * y)) * (↑(1 * z * z) - ↑(d * w * w))
⊢ ↑(1 * (x * z + d * y * w) * (x * z + d * y * w)) - ↑(d * (x * w + y * z) * (x * w + y * z)) =
    (↑(1 * x * x) - ↑(d * y * y)) * (↑(1 * z * z) - ↑(d * w * w))

tactic: ring
state_before: case h.e'_4
d✝ : ℤ
d x y z w : ℕ
xy : SqLe y d x 1
zw : SqLe w d z 1
this : 0 ≤ (↑(1 * x * x) - ↑(d * y * y)) * (↑(1 * z * z) - ↑(d * w * w))
⊢ (↑x * ↑z + ↑d * ↑y * ↑w) * (↑x * ↑z + ↑d * ↑y * ↑w) - ↑d * (↑x * ↑w + ↑y * ↑z) * (↑x * ↑w + ↑y * ↑z) =
    (↑x * ↑x - ↑d * ↑y * ↑y) * (↑z * ↑z - ↑d * ↑w * ↑w)
Theorem: List.next_cons_concat
File: Mathlib/Data/List/Cycle.lean

tactic: rw [next, nextOr_concat]
state_before: α : Type u_1
inst✝ : DecidableEq α
l : List α
x y : α
hy : x ≠ y
hx : ¬x ∈ l
h : optParam (x ∈ y :: l ++ [x]) (_ : x ∈ y :: l ++ [x])
⊢ next (y :: l ++ [x]) x h = y

tactic: rfl
state_before: α : Type u_1
inst✝ : DecidableEq α
l : List α
x y : α
hy : x ≠ y
hx : ¬x ∈ l
h : optParam (x ∈ y :: l ++ [x]) (_ : x ∈ y :: l ++ [x])
⊢ get (y :: l ++ [x]) { val := 0, isLt := (_ : 0 < length (y :: l ++ [x])) } = y

tactic: simp [hy, hx]
state_before: case h
α : Type u_1
inst✝ : DecidableEq α
l : List α
x y : α
hy : x ≠ y
hx : ¬x ∈ l
h : optParam (x ∈ y :: l ++ [x]) (_ : x ∈ y :: l ++ [x])
⊢ ¬x ∈ y :: l
Theorem: toIntermediateField_toSubalgebra
File: Mathlib/FieldTheory/IntermediateField.lean

tactic: ext
state_before: K : Type u_1
L : Type u_2
L' : Type ?u.77815
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S✝ S : IntermediateField K L
⊢ Subalgebra.toIntermediateField S.toSubalgebra (_ : ∀ (x : L), x ∈ S → x⁻¹ ∈ S) = S

tactic: rfl
state_before: case h
K : Type u_1
L : Type u_2
L' : Type ?u.77815
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S✝ S : IntermediateField K L
x✝ : L
⊢ x✝ ∈ Subalgebra.toIntermediateField S.toSubalgebra (_ : ∀ (x : L), x ∈ S → x⁻¹ ∈ S) ↔ x✝ ∈ S
Theorem: Function.Involutive.iterate_bit0
File: Mathlib/Data/Nat/Parity.lean

tactic: rw [bit0, ← two_mul, iterate_mul, involutive_iff_iter_2_eq_id.1 hf, iterate_id]
state_before: α : Type u_1
f : α → α
n✝ : ℕ
hf : Involutive f
n : ℕ
⊢ f^[bit0 n] = id
Theorem: Set.Definable.compl
File: Mathlib/ModelTheory/Definability.lean

tactic: rcases hf with ⟨φ, hφ⟩
state_before: M : Type w
A : Set M
L : Language
inst✝ : Structure L M
α : Type u₁
β : Type ?u.15860
B : Set M
s✝ s : Set (α → M)
hf : Definable A L s
⊢ Definable A L (sᶜ)

tactic: refine' ⟨φ.not, _⟩
state_before: case intro
M : Type w
A : Set M
L : Language
inst✝ : Structure L M
α : Type u₁
β : Type ?u.15860
B : Set M
s✝ s : Set (α → M)
φ : Formula (L[[↑A]]) α
hφ : s = setOf (Formula.Realize φ)
⊢ Definable A L (sᶜ)

tactic: ext v
state_before: case intro
M : Type w
A : Set M
L : Language
inst✝ : Structure L M
α : Type u₁
β : Type ?u.15860
B : Set M
s✝ s : Set (α → M)
φ : Formula (L[[↑A]]) α
hφ : s = setOf (Formula.Realize φ)
⊢ sᶜ = setOf (Formula.Realize (Formula.not φ))

tactic: rw [hφ, compl_setOf, mem_setOf, mem_setOf, Formula.realize_not]
state_before: case intro.h
M : Type w
A : Set M
L : Language
inst✝ : Structure L M
α : Type u₁
β : Type ?u.15860
B : Set M
s✝ s : Set (α → M)
φ : Formula (L[[↑A]]) α
hφ : s = setOf (Formula.Realize φ)
v : α → M
⊢ v ∈ sᶜ ↔ v ∈ setOf (Formula.Realize (Formula.not φ))
Theorem: MeasureTheory.Content.is_mul_left_invariant_innerContent
File: Mathlib/MeasureTheory/Measure/Content.lean

tactic: convert μ.innerContent_comap (Homeomorph.mulLeft g) (fun K => h g) U
state_before: G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
h :
  ∀ (g : G) {K : Compacts G},
    (fun s => ↑(toFun μ s)) (Compacts.map (fun b => g * b) (_ : Continuous fun b => g * b) K) =
      (fun s => ↑(toFun μ s)) K
g : G
U : Opens G
⊢ innerContent μ (↑(Opens.comap (Homeomorph.toContinuousMap (Homeomorph.mulLeft g))) U) = innerContent μ U
Theorem: MeasureTheory.set_lintegral_lt_top_of_bddAbove
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: obtain ⟨M, hM⟩ := hbdd
state_before: α : Type u_1
β : Type ?u.1746843
γ : Type ?u.1746846
δ : Type ?u.1746849
m : MeasurableSpace α
μ ν : Measure α
s : Set α
hs : ↑↑μ s ≠ ⊤
f : α → ℝ≥0
hf : Measurable f
hbdd : BddAbove (f '' s)
⊢ (∫⁻ (x : α) in s, ↑(f x) ∂μ) < ⊤

tactic: rw [mem_upperBounds] at hM
state_before: case intro
α : Type u_1
β : Type ?u.1746843
γ : Type ?u.1746846
δ : Type ?u.1746849
m : MeasurableSpace α
μ ν : Measure α
s : Set α
hs : ↑↑μ s ≠ ⊤
f : α → ℝ≥0
hf : Measurable f
M : ℝ≥0
hM : M ∈ upperBounds (f '' s)
⊢ (∫⁻ (x : α) in s, ↑(f x) ∂μ) < ⊤

tactic: refine'
  lt_of_le_of_lt (set_lintegral_mono hf.coe_nnreal_ennreal (@measurable_const _ _ _ _ ↑M) _) _
state_before: case intro
α : Type u_1
β : Type ?u.1746843
γ : Type ?u.1746846
δ : Type ?u.1746849
m : MeasurableSpace α
μ ν : Measure α
s : Set α
hs : ↑↑μ s ≠ ⊤
f : α → ℝ≥0
hf : Measurable f
M : ℝ≥0
hM : ∀ (x : ℝ≥0), x ∈ f '' s → x ≤ M
⊢ (∫⁻ (x : α) in s, ↑(f x) ∂μ) < ⊤

tactic: simpa using hM
state_before: case intro.refine'_1
α : Type u_1
β : Type ?u.1746843
γ : Type ?u.1746846
δ : Type ?u.1746849
m : MeasurableSpace α
μ ν : Measure α
s : Set α
hs : ↑↑μ s ≠ ⊤
f : α → ℝ≥0
hf : Measurable f
M : ℝ≥0
hM : ∀ (x : ℝ≥0), x ∈ f '' s → x ≤ M
⊢ ∀ (x : α), x ∈ s → ↑(f x) ≤ ↑M

tactic: rw [lintegral_const]
state_before: case intro.refine'_2
α : Type u_1
β : Type ?u.1746843
γ : Type ?u.1746846
δ : Type ?u.1746849
m : MeasurableSpace α
μ ν : Measure α
s : Set α
hs : ↑↑μ s ≠ ⊤
f : α → ℝ≥0
hf : Measurable f
M : ℝ≥0
hM : ∀ (x : ℝ≥0), x ∈ f '' s → x ≤ M
⊢ (∫⁻ (x : α) in s, ↑M ∂μ) < ⊤

tactic: refine' ENNReal.mul_lt_top ENNReal.coe_lt_top.ne _
state_before: case intro.refine'_2
α : Type u_1
β : Type ?u.1746843
γ : Type ?u.1746846
δ : Type ?u.1746849
m : MeasurableSpace α
μ ν : Measure α
s : Set α
hs : ↑↑μ s ≠ ⊤
f : α → ℝ≥0
hf : Measurable f
M : ℝ≥0
hM : ∀ (x : ℝ≥0), x ∈ f '' s → x ≤ M
⊢ ↑M * ↑↑(Measure.restrict μ s) univ < ⊤

tactic: simp [hs]
state_before: case intro.refine'_2
α : Type u_1
β : Type ?u.1746843
γ : Type ?u.1746846
δ : Type ?u.1746849
m : MeasurableSpace α
μ ν : Measure α
s : Set α
hs : ↑↑μ s ≠ ⊤
f : α → ℝ≥0
hf : Measurable f
M : ℝ≥0
hM : ∀ (x : ℝ≥0), x ∈ f '' s → x ≤ M
⊢ ↑↑(Measure.restrict μ s) univ ≠ ⊤
Theorem: irreducible_mul_iff
File: Mathlib/Algebra/Associated.lean

tactic: constructor
state_before: α : Type u_1
β : Type ?u.94330
γ : Type ?u.94333
δ : Type ?u.94336
inst✝ : Monoid α
a b : α
⊢ Irreducible (a * b) ↔ Irreducible a ∧ IsUnit b ∨ Irreducible b ∧ IsUnit a

tactic: refine' fun h => Or.imp (fun h' => ⟨_, h'⟩) (fun h' => ⟨_, h'⟩) (h.isUnit_or_isUnit rfl).symm
state_before: case mp
α : Type u_1
β : Type ?u.94330
γ : Type ?u.94333
δ : Type ?u.94336
inst✝ : Monoid α
a b : α
⊢ Irreducible (a * b) → Irreducible a ∧ IsUnit b ∨ Irreducible b ∧ IsUnit a

tactic: rwa [irreducible_mul_isUnit h'] at h
state_before: case mp.refine'_1
α : Type u_1
β : Type ?u.94330
γ : Type ?u.94333
δ : Type ?u.94336
inst✝ : Monoid α
a b : α
h : Irreducible (a * b)
h' : IsUnit b
⊢ Irreducible a

tactic: rwa [irreducible_isUnit_mul h'] at h
state_before: case mp.refine'_2
α : Type u_1
β : Type ?u.94330
γ : Type ?u.94333
δ : Type ?u.94336
inst✝ : Monoid α
a b : α
h : Irreducible (a * b)
h' : IsUnit a
⊢ Irreducible b

tactic: rintro (⟨ha, hb⟩ | ⟨hb, ha⟩)
state_before: case mpr
α : Type u_1
β : Type ?u.94330
γ : Type ?u.94333
δ : Type ?u.94336
inst✝ : Monoid α
a b : α
⊢ Irreducible a ∧ IsUnit b ∨ Irreducible b ∧ IsUnit a → Irreducible (a * b)

tactic: rwa [irreducible_mul_isUnit hb]
state_before: case mpr.inl.intro
α : Type u_1
β : Type ?u.94330
γ : Type ?u.94333
δ : Type ?u.94336
inst✝ : Monoid α
a b : α
ha : Irreducible a
hb : IsUnit b
⊢ Irreducible (a * b)

tactic: rwa [irreducible_isUnit_mul ha]
state_before: case mpr.inr.intro
α : Type u_1
β : Type ?u.94330
γ : Type ?u.94333
δ : Type ?u.94336
inst✝ : Monoid α
a b : α
hb : Irreducible b
ha : IsUnit a
⊢ Irreducible (a * b)
Theorem: Filter.limsSup_principal
File: Mathlib/Order/LiminfLimsup.lean

tactic: simp only [limsSup, eventually_principal]
state_before: α : Type u_1
β : Type ?u.77846
γ : Type ?u.77849
ι : Type ?u.77852
inst✝ : ConditionallyCompleteLattice α
s : Set α
h : BddAbove s
hs : Set.Nonempty s
⊢ limsSup (𝓟 s) = sSup s

tactic: exact csInf_upper_bounds_eq_csSup h hs
state_before: α : Type u_1
β : Type ?u.77846
γ : Type ?u.77849
ι : Type ?u.77852
inst✝ : ConditionallyCompleteLattice α
s : Set α
h : BddAbove s
hs : Set.Nonempty s
⊢ sInf {a | ∀ (x : α), x ∈ s → x ≤ a} = sSup s
Theorem: MeasureTheory.SimpleFunc.approx_comp
File: Mathlib/MeasureTheory/Function/SimpleFunc.lean

tactic: rw [approx_apply _ hf, approx_apply _ (hf.comp hg)]
state_before: α : Type u_3
β : Type u_1
γ : Type u_2
δ : Type ?u.827761
inst✝⁸ : MeasurableSpace α
K : Type ?u.827767
inst✝⁷ : SemilatticeSup β
inst✝⁶ : OrderBot β
inst✝⁵ : Zero β
inst✝⁴ : TopologicalSpace β
inst✝³ : OrderClosedTopology β
inst✝² : MeasurableSpace β
inst✝¹ : OpensMeasurableSpace β
inst✝ : MeasurableSpace γ
i : ℕ → β
f : γ → β
g : α → γ
n : ℕ
a : α
hf : Measurable f
hg : Measurable g
⊢ ↑(approx i (f ∘ g) n) a = ↑(approx i f n) (g a)

tactic: rfl
state_before: α : Type u_3
β : Type u_1
γ : Type u_2
δ : Type ?u.827761
inst✝⁸ : MeasurableSpace α
K : Type ?u.827767
inst✝⁷ : SemilatticeSup β
inst✝⁶ : OrderBot β
inst✝⁵ : Zero β
inst✝⁴ : TopologicalSpace β
inst✝³ : OrderClosedTopology β
inst✝² : MeasurableSpace β
inst✝¹ : OpensMeasurableSpace β
inst✝ : MeasurableSpace γ
i : ℕ → β
f : γ → β
g : α → γ
n : ℕ
a : α
hf : Measurable f
hg : Measurable g
⊢ (Finset.sup (Finset.range n) fun k => if i k ≤ (f ∘ g) a then i k else 0) =
    Finset.sup (Finset.range n) fun k => if i k ≤ f (g a) then i k else 0
Theorem: NormedSpace.eq_zero_of_forall_dual_eq_zero
File: Mathlib/Analysis/NormedSpace/Dual.lean

tactic: simp [h f]
state_before: 𝕜 : Type v
inst✝² : IsROrC 𝕜
E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
h : ∀ (f : Dual 𝕜 E), ↑f x = 0
f : Dual 𝕜 E
⊢ ‖↑f x‖ ≤ 0 * ‖f‖
Theorem: Ultrafilter.comap_id
File: Mathlib/Order/Filter/Ultrafilter.lean

tactic: rw [range_id]
state_before: α : Type u
β : Type v
γ : Type ?u.18901
f✝ g : Ultrafilter α
s t : Set α
p q : α → Prop
f : Ultrafilter α
h₀ : optParam (Injective id) (_ : Injective id)
⊢ range id ∈ f

tactic: exact univ_mem
state_before: α : Type u
β : Type v
γ : Type ?u.18901
f✝ g : Ultrafilter α
s t : Set α
p q : α → Prop
f : Ultrafilter α
h₀ : optParam (Injective id) (_ : Injective id)
⊢ univ ∈ f
Theorem: expSeries_apply_eq
File: Mathlib/Analysis/NormedSpace/Exponential.lean

tactic: simp [expSeries]
state_before: 𝕂 : Type u_2
𝔸 : Type u_1
inst✝⁴ : Field 𝕂
inst✝³ : Ring 𝔸
inst✝² : Algebra 𝕂 𝔸
inst✝¹ : TopologicalSpace 𝔸
inst✝ : TopologicalRing 𝔸
x : 𝔸
n : ℕ
⊢ (↑(expSeries 𝕂 𝔸 n) fun x_1 => x) = (↑n !)⁻¹ • x ^ n
Theorem: Finset.pimage_congr
File: Mathlib/Data/Finset/PImage.lean

tactic: subst s
state_before: α : Type u_1
β : Type u_2
inst✝² : DecidableEq β
f g : α →. β
inst✝¹ : (x : α) → Decidable (f x).Dom
inst✝ : (x : α) → Decidable (g x).Dom
s t : Finset α
b : β
h₁ : s = t
h₂ : ∀ (x : α), x ∈ t → f x = g x
⊢ pimage f s = pimage g t

tactic: ext y
state_before: α : Type u_1
β : Type u_2
inst✝² : DecidableEq β
f g : α →. β
inst✝¹ : (x : α) → Decidable (f x).Dom
inst✝ : (x : α) → Decidable (g x).Dom
t : Finset α
b : β
h₂ : ∀ (x : α), x ∈ t → f x = g x
⊢ pimage f t = pimage g t

tactic: simp (config := { contextual := true }) only [mem_pimage, ←exists_prop, h₂]
state_before: case a
α : Type u_1
β : Type u_2
inst✝² : DecidableEq β
f g : α →. β
inst✝¹ : (x : α) → Decidable (f x).Dom
inst✝ : (x : α) → Decidable (g x).Dom
t : Finset α
b : β
h₂ : ∀ (x : α), x ∈ t → f x = g x
y : β
⊢ y ∈ pimage f t ↔ y ∈ pimage g t
Theorem: Int.natAbs_odd
File: Mathlib/Data/Int/Parity.lean

tactic: rw [odd_iff_not_even, Nat.odd_iff_not_even, natAbs_even]
state_before: m n : ℤ
⊢ Odd (natAbs n) ↔ Odd n
Theorem: PiLp.norm_eq_of_L2
File: Mathlib/Analysis/NormedSpace/PiLp.lean

tactic: rw [norm_eq_of_nat 2 (by norm_cast) _]
state_before: p : ℝ≥0∞
𝕜 : Type ?u.246910
𝕜' : Type ?u.246913
ι : Type u_2
α : ι → Type ?u.246921
β✝ : ι → Type ?u.246926
inst✝² : Fintype ι
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_1
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
x : PiLp 2 β
⊢ ‖x‖ = Real.sqrt (∑ i : ι, ‖x i‖ ^ 2)

tactic: rw [Real.sqrt_eq_rpow]
state_before: p : ℝ≥0∞
𝕜 : Type ?u.246910
𝕜' : Type ?u.246913
ι : Type u_2
α : ι → Type ?u.246921
β✝ : ι → Type ?u.246926
inst✝² : Fintype ι
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_1
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
x : PiLp 2 β
⊢ (∑ i : ι, ‖x i‖ ^ 2) ^ (1 / ↑2) = Real.sqrt (∑ i : ι, ‖x i‖ ^ 2)

tactic: norm_cast
state_before: p : ℝ≥0∞
𝕜 : Type ?u.246910
𝕜' : Type ?u.246913
ι : Type u_2
α : ι → Type ?u.246921
β✝ : ι → Type ?u.246926
inst✝² : Fintype ι
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_1
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
x : PiLp 2 β
⊢ (∑ i : ι, ‖x i‖ ^ 2) ^ (1 / ↑2) = (∑ i : ι, ‖x i‖ ^ 2) ^ (1 / 2)

tactic: norm_cast
state_before: p : ℝ≥0∞
𝕜 : Type ?u.246910
𝕜' : Type ?u.246913
ι : Type u_2
α : ι → Type ?u.246921
β✝ : ι → Type ?u.246926
inst✝² : Fintype ι
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_1
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
x : PiLp 2 β
⊢ 2 = ↑2
Theorem: Stream'.Seq.append_nil
File: Mathlib/Data/Seq/Seq.lean

tactic: apply coinduction2 s
state_before: α : Type u
β : Type v
γ : Type w
s : Seq α
⊢ append s nil = s

tactic: intro s
state_before: case H
α : Type u
β : Type v
γ : Type w
s : Seq α
⊢ ∀ (s : Seq α), BisimO (fun s1 s2 => ∃ s, s1 = append s nil ∧ s2 = s) (destruct (append s nil)) (destruct s)

tactic: apply recOn s _ _
state_before: case H
α : Type u
β : Type v
γ : Type w
s✝ s : Seq α
⊢ BisimO (fun s1 s2 => ∃ s, s1 = append s nil ∧ s2 = s) (destruct (append s nil)) (destruct s)

tactic: trivial
state_before: α : Type u
β : Type v
γ : Type w
s✝ s : Seq α
⊢ BisimO (fun s1 s2 => ∃ s, s1 = append s nil ∧ s2 = s) (destruct (append nil nil)) (destruct nil)

tactic: intro x s
state_before: α : Type u
β : Type v
γ : Type w
s✝ s : Seq α
⊢ ∀ (x : α) (s : Seq α),
    BisimO (fun s1 s2 => ∃ s, s1 = append s nil ∧ s2 = s) (destruct (append (cons x s) nil)) (destruct (cons x s))

tactic: rw [cons_append, destruct_cons, destruct_cons]
state_before: α : Type u
β : Type v
γ : Type w
s✝¹ s✝ : Seq α
x : α
s : Seq α
⊢ BisimO (fun s1 s2 => ∃ s, s1 = append s nil ∧ s2 = s) (destruct (append (cons x s) nil)) (destruct (cons x s))

tactic: dsimp
state_before: α : Type u
β : Type v
γ : Type w
s✝¹ s✝ : Seq α
x : α
s : Seq α
⊢ BisimO (fun s1 s2 => ∃ s, s1 = append s nil ∧ s2 = s) (some (x, append s nil)) (some (x, s))

tactic: exact ⟨rfl, s, rfl, rfl⟩
state_before: α : Type u
β : Type v
γ : Type w
s✝¹ s✝ : Seq α
x : α
s : Seq α
⊢ x = x ∧ ∃ s_1, append s nil = append s_1 nil ∧ s = s_1
Theorem: LieAlgebra.ad_nilpotent_of_nilpotent
File: Mathlib/Algebra/Lie/Nilpotent.lean

tactic: rw [LieAlgebra.ad_eq_lmul_left_sub_lmul_right]
state_before: R : Type u
A : Type v
inst✝² : CommRing R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : A
h : IsNilpotent a
⊢ IsNilpotent (↑(LieAlgebra.ad R A) a)

tactic: have hl : IsNilpotent (LinearMap.mulLeft R a) := by rwa [LinearMap.isNilpotent_mulLeft_iff]
state_before: R : Type u
A : Type v
inst✝² : CommRing R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : A
h : IsNilpotent a
⊢ IsNilpotent ((LinearMap.mulLeft R - LinearMap.mulRight R) a)

tactic: have hr : IsNilpotent (LinearMap.mulRight R a) := by rwa [LinearMap.isNilpotent_mulRight_iff]
state_before: R : Type u
A : Type v
inst✝² : CommRing R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : A
h : IsNilpotent a
hl : IsNilpotent (LinearMap.mulLeft R a)
⊢ IsNilpotent ((LinearMap.mulLeft R - LinearMap.mulRight R) a)

tactic: have := @LinearMap.commute_mulLeft_right R A _ _ _ _ _ a a
state_before: R : Type u
A : Type v
inst✝² : CommRing R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : A
h : IsNilpotent a
hl : IsNilpotent (LinearMap.mulLeft R a)
hr : IsNilpotent (LinearMap.mulRight R a)
⊢ IsNilpotent ((LinearMap.mulLeft R - LinearMap.mulRight R) a)

tactic: exact this.isNilpotent_sub hl hr
state_before: R : Type u
A : Type v
inst✝² : CommRing R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : A
h : IsNilpotent a
hl : IsNilpotent (LinearMap.mulLeft R a)
hr : IsNilpotent (LinearMap.mulRight R a)
this : Commute (LinearMap.mulLeft R a) (LinearMap.mulRight R a)
⊢ IsNilpotent ((LinearMap.mulLeft R - LinearMap.mulRight R) a)

tactic: rwa [LinearMap.isNilpotent_mulLeft_iff]
state_before: R : Type u
A : Type v
inst✝² : CommRing R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : A
h : IsNilpotent a
⊢ IsNilpotent (LinearMap.mulLeft R a)

tactic: rwa [LinearMap.isNilpotent_mulRight_iff]
state_before: R : Type u
A : Type v
inst✝² : CommRing R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : A
h : IsNilpotent a
hl : IsNilpotent (LinearMap.mulLeft R a)
⊢ IsNilpotent (LinearMap.mulRight R a)
Theorem: Rat.div_lt_div_iff_mul_lt_mul
File: Mathlib/Data/Rat/Order.lean

tactic: simp only [lt_iff_le_not_le]
state_before: a✝ b✝ c✝ : ℚ
a b c d : ℤ
b_pos : 0 < b
d_pos : 0 < d
⊢ ↑a / ↑b < ↑c / ↑d ↔ a * d < c * b

tactic: apply and_congr
state_before: a✝ b✝ c✝ : ℚ
a b c d : ℤ
b_pos : 0 < b
d_pos : 0 < d
⊢ ↑a / ↑b ≤ ↑c / ↑d ∧ ¬↑c / ↑d ≤ ↑a / ↑b ↔ a * d ≤ c * b ∧ ¬c * b ≤ a * d

tactic: simp [div_num_den, Rat.le_def b_pos d_pos]
state_before: case h₁
a✝ b✝ c✝ : ℚ
a b c d : ℤ
b_pos : 0 < b
d_pos : 0 < d
⊢ ↑a / ↑b ≤ ↑c / ↑d ↔ a * d ≤ c * b

tactic: apply not_congr
state_before: case h₂
a✝ b✝ c✝ : ℚ
a b c d : ℤ
b_pos : 0 < b
d_pos : 0 < d
⊢ ¬↑c / ↑d ≤ ↑a / ↑b ↔ ¬c * b ≤ a * d

tactic: simp [div_num_den, Rat.le_def d_pos b_pos]
state_before: case h₂.h
a✝ b✝ c✝ : ℚ
a b c d : ℤ
b_pos : 0 < b
d_pos : 0 < d
⊢ ↑c / ↑d ≤ ↑a / ↑b ↔ c * b ≤ a * d
Theorem: FractionalIdeal.le_self_mul_one_div
File: Mathlib/RingTheory/FractionalIdeal.lean

tactic: by_cases hI_nz : I = 0
state_before: R : Type ?u.1202895
inst✝⁶ : CommRing R
S : Submonoid R
P : Type ?u.1203102
inst✝⁵ : CommRing P
inst✝⁴ : Algebra R P
loc : IsLocalization S P
R₁ : Type u_1
inst✝³ : CommRing R₁
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R₁ K
frac : IsFractionRing R₁ K
inst✝ : IsDomain R₁
I✝ J I : FractionalIdeal R₁⁰ K
hI : I ≤ 1
⊢ I ≤ I * (1 / I)

tactic: rw [hI_nz, div_zero, MulZeroClass.mul_zero]
state_before: case pos
R : Type ?u.1202895
inst✝⁶ : CommRing R
S : Submonoid R
P : Type ?u.1203102
inst✝⁵ : CommRing P
inst✝⁴ : Algebra R P
loc : IsLocalization S P
R₁ : Type u_1
inst✝³ : CommRing R₁
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R₁ K
frac : IsFractionRing R₁ K
inst✝ : IsDomain R₁
I✝ J I : FractionalIdeal R₁⁰ K
hI : I ≤ 1
hI_nz : I = 0
⊢ I ≤ I * (1 / I)

tactic: rw [← coe_le_coe, coe_mul, coe_div hI_nz, coe_one]
state_before: case neg
R : Type ?u.1202895
inst✝⁶ : CommRing R
S : Submonoid R
P : Type ?u.1203102
inst✝⁵ : CommRing P
inst✝⁴ : Algebra R P
loc : IsLocalization S P
R₁ : Type u_1
inst✝³ : CommRing R₁
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R₁ K
frac : IsFractionRing R₁ K
inst✝ : IsDomain R₁
I✝ J I : FractionalIdeal R₁⁰ K
hI : I ≤ 1
hI_nz : ¬I = 0
⊢ I ≤ I * (1 / I)

tactic: rw [← coe_le_coe, coe_one] at hI
state_before: case neg
R : Type ?u.1202895
inst✝⁶ : CommRing R
S : Submonoid R
P : Type ?u.1203102
inst✝⁵ : CommRing P
inst✝⁴ : Algebra R P
loc : IsLocalization S P
R₁ : Type u_1
inst✝³ : CommRing R₁
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R₁ K
frac : IsFractionRing R₁ K
inst✝ : IsDomain R₁
I✝ J I : FractionalIdeal R₁⁰ K
hI : I ≤ 1
hI_nz : ¬I = 0
⊢ ↑I ≤ ↑I * (1 / ↑I)

tactic: exact Submodule.le_self_mul_one_div hI
state_before: case neg
R : Type ?u.1202895
inst✝⁶ : CommRing R
S : Submonoid R
P : Type ?u.1203102
inst✝⁵ : CommRing P
inst✝⁴ : Algebra R P
loc : IsLocalization S P
R₁ : Type u_1
inst✝³ : CommRing R₁
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R₁ K
frac : IsFractionRing R₁ K
inst✝ : IsDomain R₁
I✝ J I : FractionalIdeal R₁⁰ K
hI : ↑I ≤ 1
hI_nz : ¬I = 0
⊢ ↑I ≤ ↑I * (1 / ↑I)
Theorem: LinearMap.ofIsCompl_right_apply
File: Mathlib/LinearAlgebra/Projection.lean

tactic: simp [ofIsCompl]
state_before: R : Type u_2
inst✝⁹ : Ring R
E : Type u_1
inst✝⁸ : AddCommGroup E
inst✝⁷ : Module R E
F : Type u_3
inst✝⁶ : AddCommGroup F
inst✝⁵ : Module R F
G : Type ?u.220443
inst✝⁴ : AddCommGroup G
inst✝³ : Module R G
p q : Submodule R E
S : Type ?u.221406
inst✝² : Semiring S
M : Type ?u.221412
inst✝¹ : AddCommMonoid M
inst✝ : Module S M
m : Submodule S M
h : IsCompl p q
φ : { x // x ∈ p } →ₗ[R] F
ψ : { x // x ∈ q } →ₗ[R] F
v : { x // x ∈ q }
⊢ ↑(ofIsCompl h φ ψ) ↑v = ↑ψ v
Theorem: sign_pos
File: Mathlib/Data/Sign.lean

tactic: rwa [sign_apply, if_pos]
state_before: α : Type u_1
inst✝² : Zero α
inst✝¹ : Preorder α
inst✝ : DecidableRel fun x x_1 => x < x_1
a : α
ha : 0 < a
⊢ ↑sign a = 1
Theorem: CategoryTheory.Presieve.compatible_iff_sieveCompatible
File: Mathlib/CategoryTheory/Sites/SheafOfTypes.lean

tactic: constructor
state_before: C : Type u₁
inst✝ : Category C
P Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
J J₂ : GrothendieckTopology C
x : FamilyOfElements P S.arrows
⊢ FamilyOfElements.Compatible x ↔ FamilyOfElements.SieveCompatible x

tactic: intro h Y Z f g hf
state_before: case mp
C : Type u₁
inst✝ : Category C
P Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
J J₂ : GrothendieckTopology C
x : FamilyOfElements P S.arrows
⊢ FamilyOfElements.Compatible x → FamilyOfElements.SieveCompatible x

tactic: simpa using h (𝟙 _) g (S.downward_closed hf g) hf (id_comp _)
state_before: case mp
C : Type u₁
inst✝ : Category C
P Q U : Cᵒᵖ ⥤ Type w
X Y✝ : C
S : Sieve X
R : Presieve X
J J₂ : GrothendieckTopology C
x : FamilyOfElements P S.arrows
h : FamilyOfElements.Compatible x
Y Z : C
f : Y ⟶ X
g : Z ⟶ Y
hf : S.arrows f
⊢ x (g ≫ f) (_ : S.arrows (g ≫ f)) = P.map g.op (x f hf)

tactic: intro h Y₁ Y₂ Z g₁ g₂ f₁ f₂ h₁ h₂ k
state_before: case mpr
C : Type u₁
inst✝ : Category C
P Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
J J₂ : GrothendieckTopology C
x : FamilyOfElements P S.arrows
⊢ FamilyOfElements.SieveCompatible x → FamilyOfElements.Compatible x

tactic: simp_rw [← h f₁ g₁ h₁, ← h f₂ g₂ h₂]
state_before: case mpr
C : Type u₁
inst✝ : Category C
P Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
J J₂ : GrothendieckTopology C
x : FamilyOfElements P S.arrows
h : FamilyOfElements.SieveCompatible x
Y₁ Y₂ Z : C
g₁ : Z ⟶ Y₁
g₂ : Z ⟶ Y₂
f₁ : Y₁ ⟶ X
f₂ : Y₂ ⟶ X
h₁ : S.arrows f₁
h₂ : S.arrows f₂
k : g₁ ≫ f₁ = g₂ ≫ f₂
⊢ P.map g₁.op (x f₁ h₁) = P.map g₂.op (x f₂ h₂)

tactic: congr
state_before: case mpr
C : Type u₁
inst✝ : Category C
P Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
J J₂ : GrothendieckTopology C
x : FamilyOfElements P S.arrows
h : FamilyOfElements.SieveCompatible x
Y₁ Y₂ Z : C
g₁ : Z ⟶ Y₁
g₂ : Z ⟶ Y₂
f₁ : Y₁ ⟶ X
f₂ : Y₂ ⟶ X
h₁ : S.arrows f₁
h₂ : S.arrows f₂
k : g₁ ≫ f₁ = g₂ ≫ f₂
⊢ x (g₁ ≫ f₁) (_ : S.arrows (g₁ ≫ f₁)) = x (g₂ ≫ f₂) (_ : S.arrows (g₂ ≫ f₂))