tasksource/leandojo huggingface dataset:
Theorem: Polynomial.ite_le_natDegree_coeff
File: Mathlib/Data/Polynomial/Degree/Definitions.lean

tactic: split_ifs with h
state_before: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
n : ℕ
I : Decidable (n < 1 + natDegree p)
⊢ (if n < 1 + natDegree p then coeff p n else 0) = coeff p n

tactic: rfl
state_before: case inl
R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
n : ℕ
I : Decidable (n < 1 + natDegree p)
h : n < 1 + natDegree p
⊢ coeff p n = coeff p n

tactic: exact (coeff_eq_zero_of_natDegree_lt (not_le.1 fun w => h (Nat.lt_one_add_iff.2 w))).symm
state_before: case inr
R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
n : ℕ
I : Decidable (n < 1 + natDegree p)
h : ¬n < 1 + natDegree p
⊢ 0 = coeff p n
Theorem: CategoryTheory.Limits.pullbackSymmetry_hom_of_mono_eq
File: Mathlib/CategoryTheory/Limits/Shapes/Pullbacks.lean

tactic: ext
state_before: C : Type u
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
W X Y Z : C
f : X ⟶ Y
inst✝ : Mono f
⊢ (pullbackSymmetry f f).hom = 𝟙 (pullback f f)

tactic: simp [fst_eq_snd_of_mono_eq]
state_before: case h₀
C : Type u
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
W X Y Z : C
f : X ⟶ Y
inst✝ : Mono f
⊢ (pullbackSymmetry f f).hom ≫ pullback.fst = 𝟙 (pullback f f) ≫ pullback.fst

case h₁
C : Type u
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
W X Y Z : C
f : X ⟶ Y
inst✝ : Mono f
⊢ (pullbackSymmetry f f).hom ≫ pullback.snd = 𝟙 (pullback f f) ≫ pullback.snd

tactic: simp [fst_eq_snd_of_mono_eq]
state_before: case h₁
C : Type u
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
W X Y Z : C
f : X ⟶ Y
inst✝ : Mono f
⊢ (pullbackSymmetry f f).hom ≫ pullback.snd = 𝟙 (pullback f f) ≫ pullback.snd
Theorem: Commute.sq_eq_sq_iff_eq_or_eq_neg
File: Mathlib/Algebra/GroupPower/Ring.lean

tactic: rw [← sub_eq_zero, h.sq_sub_sq, mul_eq_zero, add_eq_zero_iff_eq_neg, sub_eq_zero, or_comm]
state_before: R : Type u_1
S : Type ?u.123904
M : Type ?u.123907
inst✝¹ : Ring R
a b : R
inst✝ : NoZeroDivisors R
h : Commute a b
⊢ a ^ 2 = b ^ 2 ↔ a = b ∨ a = -b
Theorem: Finset.image_const
File: Mathlib/Data/Finset/Image.lean

tactic: simp only [mem_image, exists_prop, exists_and_right, h.bex, true_and_iff, mem_singleton,
  eq_comm]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.117445
inst✝ : DecidableEq β
f g : α → β
s✝ : Finset α
t : Finset β
a : α
b✝ c : β
s : Finset α
h : Finset.Nonempty s
b b' : β
⊢ b' ∈ image (fun x => b) s ↔ b' ∈ {b}
Theorem: Equiv.removeNone_optionCongr
File: Mathlib/Logic/Equiv/Option.lean

tactic: simp [EquivFunctor.map]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.8105
e✝ : Option α ≃ Option β
e : α ≃ β
x : α
⊢ ↑(optionCongr e) (some x) = some (↑e x)
Theorem: MeasureTheory.memℒp_re_im_iff
File: Mathlib/MeasureTheory/Function/LpSpace.lean

tactic: refine' ⟨_, fun hf => ⟨hf.re, hf.im⟩⟩
state_before: α : Type u_1
E : Type ?u.5158781
F : Type ?u.5158784
G : Type ?u.5158787
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : MeasureTheory.Measure α
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedAddCommGroup G
g : E → F
c : ℝ≥0
𝕜 : Type ?u.5387273
inst✝³ : NontriviallyNormedField 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedSpace 𝕜 F
K : Type u_2
inst✝ : IsROrC K
f : α → K
⊢ Memℒp (fun x => ↑IsROrC.re (f x)) p ∧ Memℒp (fun x => ↑IsROrC.im (f x)) p ↔ Memℒp f p

tactic: rintro ⟨hre, him⟩
state_before: α : Type u_1
E : Type ?u.5158781
F : Type ?u.5158784
G : Type ?u.5158787
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : MeasureTheory.Measure α
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedAddCommGroup G
g : E → F
c : ℝ≥0
𝕜 : Type ?u.5387273
inst✝³ : NontriviallyNormedField 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedSpace 𝕜 F
K : Type u_2
inst✝ : IsROrC K
f : α → K
⊢ Memℒp (fun x => ↑IsROrC.re (f x)) p ∧ Memℒp (fun x => ↑IsROrC.im (f x)) p → Memℒp f p

tactic: convert MeasureTheory.Memℒp.add (E := K) hre.ofReal (him.ofReal.const_mul IsROrC.I)
state_before: case intro
α : Type u_1
E : Type ?u.5158781
F : Type ?u.5158784
G : Type ?u.5158787
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : MeasureTheory.Measure α
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedAddCommGroup G
g : E → F
c : ℝ≥0
𝕜 : Type ?u.5387273
inst✝³ : NontriviallyNormedField 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedSpace 𝕜 F
K : Type u_2
inst✝ : IsROrC K
f : α → K
hre : Memℒp (fun x => ↑IsROrC.re (f x)) p
him : Memℒp (fun x => ↑IsROrC.im (f x)) p
⊢ Memℒp f p

tactic: ext1 x
state_before: case h.e'_5
α : Type u_1
E : Type ?u.5158781
F : Type ?u.5158784
G : Type ?u.5158787
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : MeasureTheory.Measure α
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedAddCommGroup G
g : E → F
c : ℝ≥0
𝕜 : Type ?u.5387273
inst✝³ : NontriviallyNormedField 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedSpace 𝕜 F
K : Type u_2
inst✝ : IsROrC K
f : α → K
hre : Memℒp (fun x => ↑IsROrC.re (f x)) p
him : Memℒp (fun x => ↑IsROrC.im (f x)) p
⊢ f = (fun x => ↑(↑IsROrC.re (f x))) + fun x => IsROrC.I * ↑(↑IsROrC.im (f x))

tactic: rw [Pi.add_apply, mul_comm, IsROrC.re_add_im]
state_before: case h.e'_5.h
α : Type u_1
E : Type ?u.5158781
F : Type ?u.5158784
G : Type ?u.5158787
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : MeasureTheory.Measure α
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedAddCommGroup G
g : E → F
c : ℝ≥0
𝕜 : Type ?u.5387273
inst✝³ : NontriviallyNormedField 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedSpace 𝕜 F
K : Type u_2
inst✝ : IsROrC K
f : α → K
hre : Memℒp (fun x => ↑IsROrC.re (f x)) p
him : Memℒp (fun x => ↑IsROrC.im (f x)) p
x : α
⊢ f x = ((fun x => ↑(↑IsROrC.re (f x))) + fun x => IsROrC.I * ↑(↑IsROrC.im (f x))) x
Theorem: Down.erase_mem_compression_of_mem_compression
File: Mathlib/Combinatorics/SetFamily/Compression/Down.lean

tactic: simp_rw [mem_compression, erase_idem]
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s : Finset α
a : α
⊢ s ∈ 𝓓 a 𝒜 → erase s a ∈ 𝓓 a 𝒜

tactic: refine' Or.imp (fun h => ⟨h.2, h.2⟩) fun h => _
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s : Finset α
a : α
⊢ s ∈ 𝒜 ∧ erase s a ∈ 𝒜 ∨ ¬s ∈ 𝒜 ∧ insert a s ∈ 𝒜 →
    erase s a ∈ 𝒜 ∧ erase s a ∈ 𝒜 ∨ ¬erase s a ∈ 𝒜 ∧ insert a (erase s a) ∈ 𝒜

tactic: rwa [erase_eq_of_not_mem (insert_ne_self.1 <| ne_of_mem_of_not_mem h.2 h.1)]
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s : Finset α
a : α
h : ¬s ∈ 𝒜 ∧ insert a s ∈ 𝒜
⊢ ¬erase s a ∈ 𝒜 ∧ insert a (erase s a) ∈ 𝒜
Theorem: Filter.eventually_congr
File: Mathlib/Order/Filter/Basic.lean

tactic: simpa only [Iff.comm] using h
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.142230
ι : Sort x
f : Filter α
p q : α → Prop
h : ∀ᶠ (x : α) in f, p x ↔ q x
hq : ∀ᶠ (x : α) in f, q x
⊢ ∀ᶠ (x : α) in f, q x ↔ p x
Theorem: continuousWithinAt_right_of_monotoneOn_of_closure_image_mem_nhdsWithin
File: Mathlib/Topology/Algebra/Order/MonotoneContinuity.lean

tactic: refine' continuousWithinAt_right_of_monotoneOn_of_exists_between h_mono hs fun b hb => _
state_before: α : Type u_2
β : Type u_1
inst✝⁶ : LinearOrder α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : OrderTopology α
inst✝³ : LinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderTopology β
inst✝ : DenselyOrdered β
f : α → β
s : Set α
a : α
h_mono : MonotoneOn f s
hs : s ∈ 𝓝[Ici a] a
hfs : closure (f '' s) ∈ 𝓝[Ici (f a)] f a
⊢ ContinuousWithinAt f (Ici a) a

tactic: rcases(mem_nhdsWithin_Ici_iff_exists_mem_Ioc_Ico_subset hb).1 hfs with ⟨b', ⟨hab', hbb'⟩, hb'⟩
state_before: α : Type u_2
β : Type u_1
inst✝⁶ : LinearOrder α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : OrderTopology α
inst✝³ : LinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderTopology β
inst✝ : DenselyOrdered β
f : α → β
s : Set α
a : α
h_mono : MonotoneOn f s
hs : s ∈ 𝓝[Ici a] a
hfs : closure (f '' s) ∈ 𝓝[Ici (f a)] f a
b : β
hb : b > f a
⊢ ∃ c, c ∈ s ∧ f c ∈ Ioo (f a) b

tactic: rcases exists_between hab' with ⟨c', hc'⟩
state_before: case intro.intro.intro
α : Type u_2
β : Type u_1
inst✝⁶ : LinearOrder α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : OrderTopology α
inst✝³ : LinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderTopology β
inst✝ : DenselyOrdered β
f : α → β
s : Set α
a : α
h_mono : MonotoneOn f s
hs : s ∈ 𝓝[Ici a] a
hfs : closure (f '' s) ∈ 𝓝[Ici (f a)] f a
b : β
hb : b > f a
b' : β
hb' : Ico (f a) b' ⊆ closure (f '' s)
hab' : f a < b'
hbb' : b' ≤ b
⊢ ∃ c, c ∈ s ∧ f c ∈ Ioo (f a) b

tactic: rcases mem_closure_iff.1 (hb' ⟨hc'.1.le, hc'.2⟩) (Ioo (f a) b') isOpen_Ioo hc' with
  ⟨_, hc, ⟨c, hcs, rfl⟩⟩
state_before: case intro.intro.intro.intro
α : Type u_2
β : Type u_1
inst✝⁶ : LinearOrder α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : OrderTopology α
inst✝³ : LinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderTopology β
inst✝ : DenselyOrdered β
f : α → β
s : Set α
a : α
h_mono : MonotoneOn f s
hs : s ∈ 𝓝[Ici a] a
hfs : closure (f '' s) ∈ 𝓝[Ici (f a)] f a
b : β
hb : b > f a
b' : β
hb' : Ico (f a) b' ⊆ closure (f '' s)
hab' : f a < b'
hbb' : b' ≤ b
c' : β
hc' : f a < c' ∧ c' < b'
⊢ ∃ c, c ∈ s ∧ f c ∈ Ioo (f a) b

tactic: exact ⟨c, hcs, hc.1, hc.2.trans_le hbb'⟩
state_before: case intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_2
β : Type u_1
inst✝⁶ : LinearOrder α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : OrderTopology α
inst✝³ : LinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderTopology β
inst✝ : DenselyOrdered β
f : α → β
s : Set α
a : α
h_mono : MonotoneOn f s
hs : s ∈ 𝓝[Ici a] a
hfs : closure (f '' s) ∈ 𝓝[Ici (f a)] f a
b : β
hb : b > f a
b' : β
hb' : Ico (f a) b' ⊆ closure (f '' s)
hab' : f a < b'
hbb' : b' ≤ b
c' : β
hc' : f a < c' ∧ c' < b'
c : α
hcs : c ∈ s
hc : f c ∈ Ioo (f a) b'
⊢ ∃ c, c ∈ s ∧ f c ∈ Ioo (f a) b
Theorem: collinear_singleton
File: Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean

tactic: rw [collinear_iff_rank_le_one, vectorSpan_singleton]
state_before: k : Type u_1
V : Type u_2
P : Type u_3
ι : Type ?u.247366
inst✝³ : DivisionRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
p : P
⊢ Collinear k {p}

tactic: simp
state_before: k : Type u_1
V : Type u_2
P : Type u_3
ι : Type ?u.247366
inst✝³ : DivisionRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
p : P
⊢ Module.rank k { x // x ∈ ⊥ } ≤ 1
Theorem: Polynomial.natTrailingDegree_mul_mirror
File: Mathlib/Data/Polynomial/Mirror.lean

tactic: by_cases hp : p = 0
state_before: R : Type u_1
inst✝¹ : Semiring R
p q : R[X]
inst✝ : NoZeroDivisors R
⊢ natTrailingDegree (p * mirror p) = 2 * natTrailingDegree p

tactic: rw [natTrailingDegree_mul hp (mt mirror_eq_zero.mp hp), mirror_natTrailingDegree, two_mul]
state_before: case neg
R : Type u_1
inst✝¹ : Semiring R
p q : R[X]
inst✝ : NoZeroDivisors R
hp : ¬p = 0
⊢ natTrailingDegree (p * mirror p) = 2 * natTrailingDegree p

tactic: rw [hp, MulZeroClass.zero_mul, natTrailingDegree_zero, MulZeroClass.mul_zero]
state_before: case pos
R : Type u_1
inst✝¹ : Semiring R
p q : R[X]
inst✝ : NoZeroDivisors R
hp : p = 0
⊢ natTrailingDegree (p * mirror p) = 2 * natTrailingDegree p
Theorem: FractionalIdeal.map_map_symm
File: Mathlib/RingTheory/FractionalIdeal.lean

tactic: rw [← map_comp, g.symm_comp, map_id]
state_before: R : Type u_1
inst✝⁶ : CommRing R
S : Submonoid R
P : Type u_2
inst✝⁵ : CommRing P
inst✝⁴ : Algebra R P
loc : IsLocalization S P
P' : Type u_3
inst✝³ : CommRing P'
inst✝² : Algebra R P'
loc' : IsLocalization S P'
P'' : Type ?u.569528
inst✝¹ : CommRing P''
inst✝ : Algebra R P''
loc'' : IsLocalization S P''
I J : FractionalIdeal S P
g✝ : P →ₐ[R] P'
g : P ≃ₐ[R] P'
⊢ map (↑(AlgEquiv.symm g)) (map (↑g) I) = I
Theorem: Relation.not_cutExpand_zero
File: Mathlib/Logic/Hydra.lean

tactic: classical
rw [cutExpand_iff]
rintro ⟨_, _, _, ⟨⟩, _⟩
state_before: α : Type u_1
r : α → α → Prop
inst✝ : IsIrrefl α r
s : Multiset α
⊢ ¬CutExpand r s 0

tactic: rw [cutExpand_iff]
state_before: α : Type u_1
r : α → α → Prop
inst✝ : IsIrrefl α r
s : Multiset α
⊢ ¬CutExpand r s 0

tactic: rintro ⟨_, _, _, ⟨⟩, _⟩
state_before: α : Type u_1
r : α → α → Prop
inst✝ : IsIrrefl α r
s : Multiset α
⊢ ¬∃ t a, (∀ (a' : α), a' ∈ t → r a' a) ∧ a ∈ 0 ∧ s = erase 0 a + t
Theorem: Ideal.bot_lt_of_maximal
File: Mathlib/RingTheory/Ideal/Basic.lean

tactic: rcases Ring.not_isField_iff_exists_ideal_bot_lt_and_lt_top.1 non_field with ⟨I, Ibot, Itop⟩
state_before: α : Type u
β : Type v
R : Type u
inst✝¹ : CommRing R
inst✝ : Nontrivial R
M : Ideal R
hm : IsMaximal M
non_field : ¬IsField R
⊢ ⊥ < M

tactic: constructor
state_before: case intro.intro
α : Type u
β : Type v
R : Type u
inst✝¹ : CommRing R
inst✝ : Nontrivial R
M : Ideal R
hm : IsMaximal M
non_field : ¬IsField R
I : Ideal R
Ibot : ⊥ < I
Itop : I < ⊤
⊢ ⊥ < M

tactic: intro mle
state_before: case intro.intro.right
α : Type u
β : Type v
R : Type u
inst✝¹ : CommRing R
inst✝ : Nontrivial R
M : Ideal R
hm : IsMaximal M
non_field : ¬IsField R
I : Ideal R
Ibot : ⊥ < I
Itop : I < ⊤
⊢ ¬↑M ⊆ ↑⊥

tactic: apply lt_irrefl (⊤ : Ideal R)
state_before: case intro.intro.right
α : Type u
β : Type v
R : Type u
inst✝¹ : CommRing R
inst✝ : Nontrivial R
M : Ideal R
hm : IsMaximal M
non_field : ¬IsField R
I : Ideal R
Ibot : ⊥ < I
Itop : I < ⊤
mle : ↑M ⊆ ↑⊥
⊢ False

tactic: have : M = ⊥ := eq_bot_iff.mpr mle
state_before: case intro.intro.right
α : Type u
β : Type v
R : Type u
inst✝¹ : CommRing R
inst✝ : Nontrivial R
M : Ideal R
hm : IsMaximal M
non_field : ¬IsField R
I : Ideal R
Ibot : ⊥ < I
Itop : I < ⊤
mle : ↑M ⊆ ↑⊥
⊢ ⊤ < ⊤

tactic: rw [←this] at Ibot
state_before: case intro.intro.right
α : Type u
β : Type v
R : Type u
inst✝¹ : CommRing R
inst✝ : Nontrivial R
M : Ideal R
hm : IsMaximal M
non_field : ¬IsField R
I : Ideal R
Ibot : ⊥ < I
Itop : I < ⊤
mle : ↑M ⊆ ↑⊥
this : M = ⊥
⊢ ⊤ < ⊤

tactic: rwa [hm.1.2 I Ibot] at Itop
state_before: case intro.intro.right
α : Type u
β : Type v
R : Type u
inst✝¹ : CommRing R
inst✝ : Nontrivial R
M : Ideal R
hm : IsMaximal M
non_field : ¬IsField R
I : Ideal R
Ibot : M < I
Itop : I < ⊤
mle : ↑M ⊆ ↑⊥
this : M = ⊥
⊢ ⊤ < ⊤

tactic: simp
state_before: case intro.intro.left
α : Type u
β : Type v
R : Type u
inst✝¹ : CommRing R
inst✝ : Nontrivial R
M : Ideal R
hm : IsMaximal M
non_field : ¬IsField R
I : Ideal R
Ibot : ⊥ < I
Itop : I < ⊤
⊢ ↑⊥ ⊆ ↑M
Theorem: Option.none_orElse'
File: Mathlib/Data/Option/Basic.lean

tactic: cases x <;> rfl
state_before: α : Type u_1
β : Type ?u.15823
γ : Type ?u.15826
δ : Type ?u.15829
x : Option α
⊢ (Option.orElse none fun x_1 => x) = x
Theorem: Function.Antiperiodic.const_inv_smul₀
File: Mathlib/Algebra/Periodic.lean

tactic: simpa only [inv_inv] using h.const_smul₀ (inv_ne_zero ha)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f g : α → β
c c₁ c₂ x : α
inst✝³ : AddCommMonoid α
inst✝² : Neg β
inst✝¹ : DivisionSemiring γ
inst✝ : Module γ α
h : Antiperiodic f c
a : γ
ha : a ≠ 0
⊢ Antiperiodic (fun x => f (a⁻¹ • x)) (a • c)
Theorem: Finset.compl_singleton
File: Mathlib/Data/Fintype/Basic.lean

tactic: rw [compl_eq_univ_sdiff, sdiff_singleton_eq_erase]
state_before: α : Type u_1
β : Type ?u.18666
γ : Type ?u.18669
inst✝¹ : Fintype α
s t : Finset α
inst✝ : DecidableEq α
a✝ a : α
⊢ {a}ᶜ = erase univ a
Theorem: List.Perm.diff_left
File: Mathlib/Data/List/Perm.lean

tactic: induction h generalizing l <;>
  first |simp [*, Perm.erase, erase_comm]
state_before: α : Type uu
β : Type vv
l₁ l₂ : List α
inst✝ : DecidableEq α
l t₁ t₂ : List α
h : t₁ ~ t₂
⊢ List.diff l t₁ = List.diff l t₂

tactic: simp [*, Perm.erase, erase_comm]
state_before: case trans
α : Type uu
β : Type vv
l₁ l₂ : List α
inst✝ : DecidableEq α
t₁ t₂ l₁✝ l₂✝ l₃✝ : List α
a✝¹ : l₁✝ ~ l₂✝
a✝ : l₂✝ ~ l₃✝
a_ih✝¹ : ∀ (l : List α), List.diff l l₁✝ = List.diff l l₂✝
a_ih✝ : ∀ (l : List α), List.diff l l₂✝ = List.diff l l₃✝
l : List α
⊢ List.diff l l₁✝ = List.diff l l₃✝
Theorem: Stream'.WSeq.destruct_map
File: Mathlib/Data/Seq/WSeq.lean

tactic: apply
  Computation.eq_of_bisim fun c1 c2 =>
    ∃ s,
      c1 = destruct (map f s) ∧
        c2 = Computation.map (Option.map (Prod.map f (map f))) (destruct s)
state_before: α : Type u
β : Type v
γ : Type w
f : α → β
s : WSeq α
⊢ destruct (map f s) = Computation.map (Option.map (Prod.map f (map f))) (destruct s)

tactic: intro c1 c2 h
state_before: case bisim
α : Type u
β : Type v
γ : Type w
f : α → β
s : WSeq α
⊢ Computation.IsBisimulation fun c1 c2 =>
    ∃ s, c1 = destruct (map f s) ∧ c2 = Computation.map (Option.map (Prod.map f (map f))) (destruct s)

tactic: cases' h with s h
state_before: case bisim
α : Type u
β : Type v
γ : Type w
f : α → β
s : WSeq α
c1 c2 : Computation (Option (β × WSeq β))
h : ∃ s, c1 = destruct (map f s) ∧ c2 = Computation.map (Option.map (Prod.map f (map f))) (destruct s)
⊢ Computation.BisimO
    (fun c1 c2 => ∃ s, c1 = destruct (map f s) ∧ c2 = Computation.map (Option.map (Prod.map f (map f))) (destruct s))
    (Computation.destruct c1) (Computation.destruct c2)

tactic: rw [h.left, h.right]
state_before: case bisim.intro
α : Type u
β : Type v
γ : Type w
f : α → β
s✝ : WSeq α
c1 c2 : Computation (Option (β × WSeq β))
s : WSeq α
h : c1 = destruct (map f s) ∧ c2 = Computation.map (Option.map (Prod.map f (map f))) (destruct s)
⊢ Computation.BisimO
    (fun c1 c2 => ∃ s, c1 = destruct (map f s) ∧ c2 = Computation.map (Option.map (Prod.map f (map f))) (destruct s))
    (Computation.destruct c1) (Computation.destruct c2)

tactic: induction' s using WSeq.recOn with a s s <;> simp
state_before: case bisim.intro
α : Type u
β : Type v
γ : Type w
f : α → β
s✝ : WSeq α
c1 c2 : Computation (Option (β × WSeq β))
s : WSeq α
h : c1 = destruct (map f s) ∧ c2 = Computation.map (Option.map (Prod.map f (map f))) (destruct s)
⊢ Computation.BisimO
    (fun c1 c2 => ∃ s, c1 = destruct (map f s) ∧ c2 = Computation.map (Option.map (Prod.map f (map f))) (destruct s))
    (Computation.destruct (destruct (map f s)))
    (Computation.destruct (Computation.map (Option.map (Prod.map f (map f))) (destruct s)))

tactic: exact ⟨s, rfl, rfl⟩
state_before: case bisim.intro.h3
α : Type u
β : Type v
γ : Type w
f : α → β
s✝¹ : WSeq α
c1 c2 : Computation (Option (β × WSeq β))
s✝ : WSeq α
h✝ : c1 = destruct (map f s✝) ∧ c2 = Computation.map (Option.map (Prod.map f (map f))) (destruct s✝)
s : WSeq α
h : c1 = destruct (map f (think s)) ∧ c2 = Computation.map (Option.map (Prod.map f (map f))) (destruct (think s))
⊢ ∃ s_1,
    destruct (map f s) = destruct (map f s_1) ∧
      Computation.map (Option.map (Prod.map f (map f))) (destruct s) =
        Computation.map (Option.map (Prod.map f (map f))) (destruct s_1)

tactic: exact ⟨s, rfl, rfl⟩
state_before: case r
α : Type u
β : Type v
γ : Type w
f : α → β
s : WSeq α
⊢ ∃ s_1,
    destruct (map f s) = destruct (map f s_1) ∧
      Computation.map (Option.map (Prod.map f (map f))) (destruct s) =
        Computation.map (Option.map (Prod.map f (map f))) (destruct s_1)
Theorem: Finsupp.card_Iic
File: Mathlib/Data/Finsupp/Interval.lean

tactic: classical simp_rw [Iic_eq_Icc, card_Icc, Finsupp.bot_eq_zero, support_zero, empty_union,
    zero_apply, bot_eq_zero]
state_before: ι : Type u_1
α : Type u_2
inst✝¹ : CanonicallyOrderedAddMonoid α
inst✝ : LocallyFiniteOrder α
f : ι →₀ α
⊢ card (Iic f) = ∏ i in f.support, card (Iic (↑f i))

tactic: simp_rw [Iic_eq_Icc, card_Icc, Finsupp.bot_eq_zero, support_zero, empty_union,
zero_apply, bot_eq_zero]
state_before: ι : Type u_1
α : Type u_2
inst✝¹ : CanonicallyOrderedAddMonoid α
inst✝ : LocallyFiniteOrder α
f : ι →₀ α
⊢ card (Iic f) = ∏ i in f.support, card (Iic (↑f i))
Theorem: disjoint_sup_right
File: Mathlib/Order/Disjoint.lean

tactic: simp only [disjoint_iff, inf_sup_left, sup_eq_bot_iff]
state_before: α : Type u_1
inst✝¹ : DistribLattice α
inst✝ : OrderBot α
a b c : α
⊢ Disjoint a (b ⊔ c) ↔ Disjoint a b ∧ Disjoint a c
Theorem: ite_pow
File: Mathlib/Algebra/GroupPower/Basic.lean

tactic: split_ifs <;> rfl
state_before: α : Type ?u.4429
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝¹ : Pow M ℕ
P : Prop
inst✝ : Decidable P
a b : M
c : ℕ
⊢ (if P then a else b) ^ c = if P then a ^ c else b ^ c
Theorem: List.sublistsLen_sublist_sublists'
File: Mathlib/Data/List/Sublists.lean

tactic: simp
state_before: α✝ : Type u
β : Type v
γ : Type w
α : Type u_1
l : List α
⊢ sublistsLen 0 l <+ sublists' l

tactic: rw [sublistsLen_succ_cons, sublists'_cons]
state_before: α✝ : Type u
β : Type v
γ : Type w
α : Type u_1
n : ℕ
a : α
l : List α
⊢ sublistsLen (n + 1) (a :: l) <+ sublists' (a :: l)

tactic: exact (sublistsLen_sublist_sublists' _ _).append ((sublistsLen_sublist_sublists' _ _).map _)
state_before: α✝ : Type u
β : Type v
γ : Type w
α : Type u_1
n : ℕ
a : α
l : List α
⊢ sublistsLen (n + 1) l ++ map (cons a) (sublistsLen n l) <+ sublists' l ++ map (cons a) (sublists' l)
Theorem: zero_eq_nndist
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: simp only [← NNReal.eq_iff, ← dist_nndist, imp_self, NNReal.coe_zero, zero_eq_dist]
state_before: α : Type u
β : Type v
X : Type ?u.552184
ι : Type ?u.552187
inst✝¹ : PseudoMetricSpace α
γ : Type w
inst✝ : MetricSpace γ
x y : γ
⊢ 0 = nndist x y ↔ x = y
Theorem: Equiv.pointReflection_midpoint_right
File: Mathlib/LinearAlgebra/AffineSpace/Midpoint.lean

tactic: rw [midpoint_comm, Equiv.pointReflection_midpoint_left]
state_before: R : Type u_3
V : Type u_2
V' : Type ?u.28779
P : Type u_1
P' : Type ?u.28785
inst✝⁷ : Ring R
inst✝⁶ : Invertible 2
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x✝ y✝ z x y : P
⊢ ↑(pointReflection (midpoint R x y)) y = x
Theorem: List.lookupAll_nodup
File: Mathlib/Data/List/Sigma.lean

tactic: (rw [lookupAll_eq_dlookup a h]; apply Option.toList_nodup)
state_before: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
l : List (Sigma β)
h : NodupKeys l
⊢ Nodup (lookupAll a l)

tactic: rw [lookupAll_eq_dlookup a h]
state_before: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
l : List (Sigma β)
h : NodupKeys l
⊢ Nodup (lookupAll a l)

tactic: apply Option.toList_nodup
state_before: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
l : List (Sigma β)
h : NodupKeys l
⊢ Nodup (Option.toList (dlookup a l))
Theorem: Turing.ToPartrec.Code.zero_eval
File: Mathlib/Computability/TMToPartrec.lean

tactic: simp [zero]
state_before: v : List ℕ
⊢ eval zero v = pure [0]
Theorem: MonoidHom.range_top_iff_surjective
File: Mathlib/GroupTheory/Subgroup/Basic.lean

tactic: rw [coe_range, coe_top]
state_before: G : Type u_2
G' : Type ?u.475486
inst✝⁵ : Group G
inst✝⁴ : Group G'
A : Type ?u.475495
inst✝³ : AddGroup A
N✝ : Type ?u.475501
P : Type ?u.475504
inst✝² : Group N✝
inst✝¹ : Group P
K : Subgroup G
N : Type u_1
inst✝ : Group N
f : G →* N
⊢ ↑(range f) = ↑⊤ ↔ Set.range ↑f = Set.univ