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

tactic: classical
  ext x
  simp only [mem_singleton, forall_eq, mem_filter]
  split_ifs with h <;> by_cases h' : x = a <;> simp [h, h']
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
s : Finset α
a : α
⊢ filter p {a} = if p a then {a} else ∅
state_after: no goals

tactic: ext x
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
s : Finset α
a : α
⊢ filter p {a} = if p a then {a} else ∅
state_after: case a
α : Type u_1
β : Type u_2
γ : Type u_3
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
s : Finset α
a x : α
⊢ x ∈ filter p {a} ↔ x ∈ if p a then {a} else ∅

tactic: simp only [mem_singleton, forall_eq, mem_filter]
state_before: case a
α : Type u_1
β : Type u_2
γ : Type u_3
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
s : Finset α
a x : α
⊢ x ∈ filter p {a} ↔ x ∈ if p a then {a} else ∅
state_after: case a
α : Type u_1
β : Type u_2
γ : Type u_3
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
s : Finset α
a x : α
⊢ x = a ∧ p x ↔ x ∈ if p a then {a} else ∅

tactic: split_ifs with h <;> by_cases h' : x = a <;> simp [h, h']
state_before: case a
α : Type u_1
β : Type u_2
γ : Type u_3
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
s : Finset α
a x : α
⊢ x = a ∧ p x ↔ x ∈ if p a then {a} else ∅
state_after: no goals
Theorem: CochainComplex.HomComplex.Cochain.units_smul_comp
File: Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean

tactic: apply Cochain.smul_comp
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₁₂ : ℤ
k : Rˣ
z₁ : Cochain F G n₁
z₂ : Cochain G K n₂
h : n₁ + n₂ = n₁₂
⊢ (k • z₁).comp z₂ h = k • z₁.comp z₂ h
state_after: no goals
Theorem: AddSubmonoid.mul_eq_closure_mul_set
File: Mathlib/Algebra/Group/Submonoid/Pointwise.lean

tactic: rw [← closure_mul_closure, closure_eq, closure_eq]
state_before: α : Type u_1
G : Type u_2
M✝ : Type u_3
R : Type u_4
A : Type u_5
inst✝² : Monoid M✝
inst✝¹ : AddMonoid A
inst✝ : NonUnitalNonAssocSemiring R
M N : AddSubmonoid R
⊢ M * N = closure (↑M * ↑N)
state_after: no goals
Theorem: Pullback.continuous_proj
File: Mathlib/Topology/FiberBundle/Constructions.lean

tactic: rw [continuous_iff_le_induced, Pullback.TotalSpace.topologicalSpace, pullbackTopology_def]
state_before: B : Type u
F : Type v
E : B → Type w₁
B' : Type w₂
f✝ : B' → B
inst✝¹ : TopologicalSpace B'
inst✝ : TopologicalSpace (TotalSpace F E)
f : B' → B
⊢ Continuous TotalSpace.proj
state_after: B : Type u
F : Type v
E : B → Type w₁
B' : Type w₂
f✝ : B' → B
inst✝¹ : TopologicalSpace B'
inst✝ : TopologicalSpace (TotalSpace F E)
f : B' → B
⊢ induced TotalSpace.proj inst✝¹ ⊓ induced (Pullback.lift f) inst✝ ≤ induced TotalSpace.proj inst✝¹

tactic: exact inf_le_left
state_before: B : Type u
F : Type v
E : B → Type w₁
B' : Type w₂
f✝ : B' → B
inst✝¹ : TopologicalSpace B'
inst✝ : TopologicalSpace (TotalSpace F E)
f : B' → B
⊢ induced TotalSpace.proj inst✝¹ ⊓ induced (Pullback.lift f) inst✝ ≤ induced TotalSpace.proj inst✝¹
state_after: no goals
Theorem: IsFractionRing.num_mul_den_eq_num_iff_eq'
File: Mathlib/RingTheory/Localization/NumDen.lean

tactic: simpa only [eq_comm, mk'_num_den] using eq_mk'_iff_mul_eq.mpr h
state_before: R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommRing S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommRing P
A : Type u_4
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
K : Type u_5
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
x y : K
h : y * (algebraMap A K) ↑(den A x) = (algebraMap A K) (num A x)
⊢ x = y
state_after: no goals

tactic: rw [h, mk'_num_den]
state_before: R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommRing S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommRing P
A : Type u_4
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : UniqueFactorizationMonoid A
K : Type u_5
inst✝² : Field K
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
x y : K
h : x = y
⊢ y = mk' K (num A x) (den A x)
state_after: no goals
Theorem: Matroid.mapEquiv_dep_iff
File: Mathlib/Data/Matroid/Map.lean

tactic: rw [mapEquiv_eq_map, map_dep_iff]
state_before: α : Type u_1
β : Type u_2
f✝ : α → β
E I s : Set α
M : Matroid α
N : Matroid β
f : α ≃ β
D : Set β
⊢ (M.mapEquiv f).Dep D ↔ M.Dep (⇑f.symm '' D)
state_after: α : Type u_1
β : Type u_2
f✝ : α → β
E I s : Set α
M : Matroid α
N : Matroid β
f : α ≃ β
D : Set β
⊢ (∃ D₀, M.Dep D₀ ∧ D = ⇑f '' D₀) ↔ M.Dep (⇑f.symm '' D)

tactic: exact ⟨by rintro ⟨I, hI, rfl⟩; simpa, fun h ↦ ⟨_, h, by simp⟩⟩
state_before: α : Type u_1
β : Type u_2
f✝ : α → β
E I s : Set α
M : Matroid α
N : Matroid β
f : α ≃ β
D : Set β
⊢ (∃ D₀, M.Dep D₀ ∧ D = ⇑f '' D₀) ↔ M.Dep (⇑f.symm '' D)
state_after: no goals

tactic: rintro ⟨I, hI, rfl⟩
state_before: α : Type u_1
β : Type u_2
f✝ : α → β
E I s : Set α
M : Matroid α
N : Matroid β
f : α ≃ β
D : Set β
⊢ (∃ D₀, M.Dep D₀ ∧ D = ⇑f '' D₀) → M.Dep (⇑f.symm '' D)
state_after: case intro.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : α ≃ β
I : Set α
hI : M.Dep I
⊢ M.Dep (⇑f.symm '' (⇑f '' I))

tactic: simpa
state_before: case intro.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : α ≃ β
I : Set α
hI : M.Dep I
⊢ M.Dep (⇑f.symm '' (⇑f '' I))
state_after: no goals

tactic: simp
state_before: α : Type u_1
β : Type u_2
f✝ : α → β
E I s : Set α
M : Matroid α
N : Matroid β
f : α ≃ β
D : Set β
h : M.Dep (⇑f.symm '' D)
⊢ D = ⇑f '' (⇑f.symm '' D)
state_after: no goals
Theorem: TopologicalSpace.ext_iff_nhds
File: Mathlib/Topology/Basic.lean

tactic: ext
state_before: X : Type u
Y : Type v
ι : Sort w
α : Type u_1
β : Type u_2
x : X
s s₁ s₂ t✝ : Set X
p p₁ p₂ : X → Prop
inst✝ t t' : TopologicalSpace X
H : ∀ (x : X), 𝓝 x = 𝓝 x
⊢ t = t'
state_after: case a.h.a
X : Type u
Y : Type v
ι : Sort w
α : Type u_1
β : Type u_2
x : X
s s₁ s₂ t✝ : Set X
p p₁ p₂ : X → Prop
inst✝ t t' : TopologicalSpace X
H : ∀ (x : X), 𝓝 x = 𝓝 x
x✝ : Set X
⊢ IsOpen x✝ ↔ IsOpen x✝

tactic: simp_rw [@isOpen_iff_nhds _ _ _, H]
state_before: case a.h.a
X : Type u
Y : Type v
ι : Sort w
α : Type u_1
β : Type u_2
x : X
s s₁ s₂ t✝ : Set X
p p₁ p₂ : X → Prop
inst✝ t t' : TopologicalSpace X
H : ∀ (x : X), 𝓝 x = 𝓝 x
x✝ : Set X
⊢ IsOpen x✝ ↔ IsOpen x✝
state_after: no goals
Theorem: CategoryTheory.Abelian.OfCoimageImageComparisonIsIso.imageMonoFactorisation_e'
File: Mathlib/CategoryTheory/Abelian/Basic.lean

tactic: dsimp
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasKernels C
inst✝ : HasCokernels C
X Y : C
f : X ⟶ Y
⊢ (imageMonoFactorisation f).e = cokernel.π (kernel.ι f) ≫ coimageImageComparison f
state_after: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasKernels C
inst✝ : HasCokernels C
X Y : C
f : X ⟶ Y
⊢ kernel.lift (cokernel.π f) f ⋯ = cokernel.π (kernel.ι f) ≫ coimageImageComparison f

tactic: ext
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasKernels C
inst✝ : HasCokernels C
X Y : C
f : X ⟶ Y
⊢ kernel.lift (cokernel.π f) f ⋯ = cokernel.π (kernel.ι f) ≫ coimageImageComparison f
state_after: case h
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasKernels C
inst✝ : HasCokernels C
X Y : C
f : X ⟶ Y
⊢ kernel.lift (cokernel.π f) f ⋯ ≫ equalizer.ι (cokernel.π f) 0 =
    (cokernel.π (kernel.ι f) ≫ coimageImageComparison f) ≫ equalizer.ι (cokernel.π f) 0

tactic: simp only [Abelian.coimageImageComparison, imageMonoFactorisation_e, Category.assoc,
  cokernel.π_desc_assoc]
state_before: case h
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasKernels C
inst✝ : HasCokernels C
X Y : C
f : X ⟶ Y
⊢ kernel.lift (cokernel.π f) f ⋯ ≫ equalizer.ι (cokernel.π f) 0 =
    (cokernel.π (kernel.ι f) ≫ coimageImageComparison f) ≫ equalizer.ι (cokernel.π f) 0
state_after: no goals
Theorem: finprod_set_coe_eq_finprod_mem
File: Mathlib/Algebra/BigOperators/Finprod.lean

tactic: rw [← finprod_mem_range, Subtype.range_coe]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
G : Type u_4
M : Type u_5
N : Type u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s✝ t s : Set α
⊢ ∏ᶠ (j : ↑s), f ↑j = ∏ᶠ (i : α) (_ : i ∈ s), f i
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
G : Type u_4
M : Type u_5
N : Type u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s✝ t s : Set α
⊢ Injective Subtype.val

tactic: exact Subtype.coe_injective
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
G : Type u_4
M : Type u_5
N : Type u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s✝ t s : Set α
⊢ Injective Subtype.val
state_after: no goals
Theorem: Subgroup.index_map_dvd
File: Mathlib/GroupTheory/Index.lean

tactic: rw [index_map, f.range_top_of_surjective hf, index_top, mul_one]
state_before: G : Type u_1
inst✝¹ : Group G
H K L : Subgroup G
G' : Type u_2
inst✝ : Group G'
f : G →* G'
hf : Function.Surjective ⇑f
⊢ (map f H).index ∣ H.index
state_after: G : Type u_1
inst✝¹ : Group G
H K L : Subgroup G
G' : Type u_2
inst✝ : Group G'
f : G →* G'
hf : Function.Surjective ⇑f
⊢ (H ⊔ f.ker).index ∣ H.index

tactic: exact index_dvd_of_le le_sup_left
state_before: G : Type u_1
inst✝¹ : Group G
H K L : Subgroup G
G' : Type u_2
inst✝ : Group G'
f : G →* G'
hf : Function.Surjective ⇑f
⊢ (H ⊔ f.ker).index ∣ H.index
state_after: no goals
Theorem: SimpleGraph.locallyLinear_comap
File: Mathlib/Combinatorics/SimpleGraph/Triangle/Basic.lean

tactic: refine ⟨fun h ↦ ?_, ?_⟩
state_before: α : Type u_1
β : Type u_2
𝕜 : Type u_3
inst✝ : LinearOrderedField 𝕜
G✝ H : SimpleGraph α
ε δ : 𝕜
n : ℕ
s : Finset α
G : SimpleGraph β
e : α ≃ β
⊢ (SimpleGraph.comap (⇑e) G).LocallyLinear ↔ G.LocallyLinear
state_after: case refine_1
α : Type u_1
β : Type u_2
𝕜 : Type u_3
inst✝ : LinearOrderedField 𝕜
G✝ H : SimpleGraph α
ε δ : 𝕜
n : ℕ
s : Finset α
G : SimpleGraph β
e : α ≃ β
h : (SimpleGraph.comap (⇑e) G).LocallyLinear
⊢ G.LocallyLinear

case refine_2
α : Type u_1
β : Type u_2
𝕜 : Type u_3
inst✝ : LinearOrderedField 𝕜
G✝ H : SimpleGraph α
ε δ : 𝕜
n : ℕ
s : Finset α
G : SimpleGraph β
e : α ≃ β
⊢ G.LocallyLinear → (SimpleGraph.comap (⇑e) G).LocallyLinear

tactic: rw [← comap_map_eq e.symm.toEmbedding G, comap_symm, map_symm]
state_before: case refine_1
α : Type u_1
β : Type u_2
𝕜 : Type u_3
inst✝ : LinearOrderedField 𝕜
G✝ H : SimpleGraph α
ε δ : 𝕜
n : ℕ
s : Finset α
G : SimpleGraph β
e : α ≃ β
h : (SimpleGraph.comap (⇑e) G).LocallyLinear
⊢ G.LocallyLinear
state_after: case refine_1
α : Type u_1
β : Type u_2
𝕜 : Type u_3
inst✝ : LinearOrderedField 𝕜
G✝ H : SimpleGraph α
ε δ : 𝕜
n : ℕ
s : Finset α
G : SimpleGraph β
e : α ≃ β
h : (SimpleGraph.comap (⇑e) G).LocallyLinear
⊢ (SimpleGraph.map e.toEmbedding (SimpleGraph.comap (⇑e.toEmbedding) G)).LocallyLinear

tactic: exact h.map _
state_before: case refine_1
α : Type u_1
β : Type u_2
𝕜 : Type u_3
inst✝ : LinearOrderedField 𝕜
G✝ H : SimpleGraph α
ε δ : 𝕜
n : ℕ
s : Finset α
G : SimpleGraph β
e : α ≃ β
h : (SimpleGraph.comap (⇑e) G).LocallyLinear
⊢ (SimpleGraph.map e.toEmbedding (SimpleGraph.comap (⇑e.toEmbedding) G)).LocallyLinear
state_after: no goals

tactic: rw [← Equiv.coe_toEmbedding, ← map_symm]
state_before: case refine_2
α : Type u_1
β : Type u_2
𝕜 : Type u_3
inst✝ : LinearOrderedField 𝕜
G✝ H : SimpleGraph α
ε δ : 𝕜
n : ℕ
s : Finset α
G : SimpleGraph β
e : α ≃ β
⊢ G.LocallyLinear → (SimpleGraph.comap (⇑e) G).LocallyLinear
state_after: case refine_2
α : Type u_1
β : Type u_2
𝕜 : Type u_3
inst✝ : LinearOrderedField 𝕜
G✝ H : SimpleGraph α
ε δ : 𝕜
n : ℕ
s : Finset α
G : SimpleGraph β
e : α ≃ β
⊢ G.LocallyLinear → (SimpleGraph.map e.symm.toEmbedding G).LocallyLinear

tactic: exact LocallyLinear.map _
state_before: case refine_2
α : Type u_1
β : Type u_2
𝕜 : Type u_3
inst✝ : LinearOrderedField 𝕜
G✝ H : SimpleGraph α
ε δ : 𝕜
n : ℕ
s : Finset α
G : SimpleGraph β
e : α ≃ β
⊢ G.LocallyLinear → (SimpleGraph.map e.symm.toEmbedding G).LocallyLinear
state_after: no goals
Theorem: IsLocalizedModule.mk'_eq_zero'
File: Mathlib/Algebra/Module/LocalizedModule.lean

tactic: simp_rw [← mk'_zero f (1 : S), mk'_eq_mk'_iff, smul_zero, one_smul, eq_comm]
state_before: R : Type u_1
inst✝¹² : CommSemiring R
S : Submonoid R
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : AddCommMonoid M'
inst✝⁹ : AddCommMonoid M''
A : Type u_5
inst✝⁸ : CommSemiring A
inst✝⁷ : Algebra R A
inst✝⁶ : Module A M'
inst✝⁵ : IsLocalization S A
inst✝⁴ : Module R M
inst✝³ : Module R M'
inst✝² : Module R M''
inst✝¹ : IsScalarTower R A M'
f : M →ₗ[R] M'
g : M →ₗ[R] M''
inst✝ : IsLocalizedModule S f
m : M
s : ↥S
⊢ mk' f m s = 0 ↔ ∃ s', s' • m = 0
state_after: no goals
Theorem: Real.borel_eq_generateFrom_Iic_rat
File: Mathlib/MeasureTheory/Constructions/BorelSpace/Real.lean

tactic: rw [borel_eq_generateFrom_Ioi_rat, iUnion_singleton_eq_range, iUnion_singleton_eq_range]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort y
s t u : Set α
⊢ borel ℝ = generateFrom (⋃ a, {Iic ↑a})
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort y
s t u : Set α
⊢ generateFrom (range fun a => Ioi ↑a) = generateFrom (range fun a => Iic ↑a)

tactic: refine le_antisymm (generateFrom_le ?_) (generateFrom_le ?_) <;>
rintro _ ⟨q, rfl⟩ <;>
dsimp only <;>
[rw [← compl_Iic]; rw [← compl_Ioi]] <;>
exact MeasurableSet.compl (GenerateMeasurable.basic _ (mem_range_self q))
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort y
s t u : Set α
⊢ generateFrom (range fun a => Ioi ↑a) = generateFrom (range fun a => Iic ↑a)
state_after: no goals
Theorem: Real.toNNReal_pow
File: Mathlib/Data/NNReal/Basic.lean

tactic: rw [← coe_inj, NNReal.coe_pow, Real.coe_toNNReal _ (pow_nonneg hx _),
  Real.coe_toNNReal x hx]
state_before: x : ℝ
hx : 0 ≤ x
n : ℕ
⊢ (x ^ n).toNNReal = x.toNNReal ^ n
state_after: no goals
Theorem: AlgebraicGeometry.Scheme.Pullback.t_fst_fst
File: Mathlib/AlgebraicGeometry/Pullbacks.lean

tactic: simp only [t, Category.assoc, pullbackSymmetry_hom_comp_fst_assoc, pullbackAssoc_hom_snd_fst,
  pullback.lift_fst_assoc, pullbackSymmetry_hom_comp_snd, pullbackAssoc_inv_fst_fst,
  pullbackSymmetry_hom_comp_fst]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : Scheme
𝒰 : X.OpenCover
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (i : 𝒰.J), HasPullback (𝒰.map i ≫ f) g
i j : 𝒰.J
⊢ t 𝒰 f g i j ≫ pullback.fst ≫ pullback.fst = pullback.snd
state_after: no goals
Theorem: vsub_self
File: Mathlib/Algebra/AddTorsor.lean

tactic: rw [← zero_add (p -ᵥ p), ← vadd_vsub_assoc, vadd_vsub]
state_before: G : Type u_1
P : Type u_2
inst✝ : AddGroup G
T : AddTorsor G P
p : P
⊢ p -ᵥ p = 0
state_after: no goals
Theorem: DFinsupp.support_zipWith
File: Mathlib/Data/DFinsupp/Basic.lean

tactic: simp [zipWith_def]
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝⁶ : DecidableEq ι
inst✝⁵ : (i : ι) → Zero (β i)
inst✝⁴ : (i : ι) → (x : β i) → Decidable (x ≠ 0)
inst✝³ : (i : ι) → Zero (β₁ i)
inst✝² : (i : ι) → Zero (β₂ i)
inst✝¹ : (i : ι) → (x : β₁ i) → Decidable (x ≠ 0)
inst✝ : (i : ι) → (x : β₂ i) → Decidable (x ≠ 0)
f : (i : ι) → β₁ i → β₂ i → β i
hf : ∀ (i : ι), f i 0 0 = 0
g₁ : Π₀ (i : ι), β₁ i
g₂ : Π₀ (i : ι), β₂ i
⊢ (zipWith f hf g₁ g₂).support ⊆ g₁.support ∪ g₂.support
state_after: no goals
Theorem: Stream'.WSeq.liftRel_think_left
File: Mathlib/Data/Seq/WSeq.lean

tactic: rw [liftRel_destruct_iff, liftRel_destruct_iff]
state_before: α : Type u
β : Type v
γ : Type w
R : α → β → Prop
s : WSeq α
t : WSeq β
⊢ LiftRel R s.think t ↔ LiftRel R s t
state_after: α : Type u
β : Type v
γ : Type w
R : α → β → Prop
s : WSeq α
t : WSeq β
⊢ Computation.LiftRel (LiftRelO R (LiftRel R)) s.think.destruct t.destruct ↔
    Computation.LiftRel (LiftRelO R (LiftRel R)) s.destruct t.destruct

tactic: simp
state_before: α : Type u
β : Type v
γ : Type w
R : α → β → Prop
s : WSeq α
t : WSeq β
⊢ Computation.LiftRel (LiftRelO R (LiftRel R)) s.think.destruct t.destruct ↔
    Computation.LiftRel (LiftRelO R (LiftRel R)) s.destruct t.destruct
state_after: no goals
Theorem: TruncatedWittVector.mk_coeff
File: Mathlib/RingTheory/WittVector/Truncated.lean

tactic: ext i
state_before: p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
R : Type u_1
x : TruncatedWittVector p n R
⊢ (mk p fun i => coeff i x) = x
state_after: case h
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
R : Type u_1
x : TruncatedWittVector p n R
i : Fin n
⊢ coeff i (mk p fun i => coeff i x) = coeff i x

tactic: rw [coeff_mk]
state_before: case h
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
R : Type u_1
x : TruncatedWittVector p n R
i : Fin n
⊢ coeff i (mk p fun i => coeff i x) = coeff i x
state_after: no goals
Theorem: Polynomial.integralNormalization_support
File: Mathlib/RingTheory/Polynomial/IntegralNormalization.lean

tactic: intro
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
f : R[X]
⊢ f.integralNormalization.support ⊆ f.support
state_after: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
f : R[X]
a✝ : ℕ
⊢ a✝ ∈ f.integralNormalization.support → a✝ ∈ f.support

tactic: simp (config := { contextual := true }) [integralNormalization, coeff_monomial, mem_support_iff]
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
f : R[X]
a✝ : ℕ
⊢ a✝ ∈ f.integralNormalization.support → a✝ ∈ f.support
state_after: no goals
Theorem: LaurentPolynomial.toLaurent_reverse
File: Mathlib/Algebra/Polynomial/Laurent.lean

tactic: nontriviality R
state_before: R✝ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
p : R[X]
⊢ toLaurent p.reverse = invert (toLaurent p) * T ↑p.natDegree
state_after: R✝ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
p : R[X]
a✝ : Nontrivial R
⊢ toLaurent p.reverse = invert (toLaurent p) * T ↑p.natDegree

tactic: induction' p using Polynomial.recOnHorner with p t _ _ ih p hp ih
state_before: R✝ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
p : R[X]
a✝ : Nontrivial R
⊢ toLaurent p.reverse = invert (toLaurent p) * T ↑p.natDegree
state_after: case M0
R✝ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
a✝ : Nontrivial R
⊢ toLaurent (reverse 0) = invert (toLaurent 0) * T ↑(natDegree 0)

case MC
R✝ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
a✝² : Nontrivial R
p : R[X]
t : R
a✝¹ : p.coeff 0 = 0
a✝ : t ≠ 0
ih : toLaurent p.reverse = invert (toLaurent p) * T ↑p.natDegree
⊢ toLaurent (p + Polynomial.C t).reverse = invert (toLaurent (p + Polynomial.C t)) * T ↑(p + Polynomial.C t).natDegree

case MX
R✝ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
a✝ : Nontrivial R
p : R[X]
hp : p ≠ 0
ih : toLaurent p.reverse = invert (toLaurent p) * T ↑p.natDegree
⊢ toLaurent (p * X).reverse = invert (toLaurent (p * X)) * T ↑(p * X).natDegree

tactic: simp
state_before: case M0
R✝ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
a✝ : Nontrivial R
⊢ toLaurent (reverse 0) = invert (toLaurent 0) * T ↑(natDegree 0)
state_after: no goals

tactic: simp [add_mul, ← ih]
state_before: case MC
R✝ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
a✝² : Nontrivial R
p : R[X]
t : R
a✝¹ : p.coeff 0 = 0
a✝ : t ≠ 0
ih : toLaurent p.reverse = invert (toLaurent p) * T ↑p.natDegree
⊢ toLaurent (p + Polynomial.C t).reverse = invert (toLaurent (p + Polynomial.C t)) * T ↑(p + Polynomial.C t).natDegree
state_after: no goals

tactic: simpa [natDegree_mul_X hp]
state_before: case MX
R✝ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
a✝ : Nontrivial R
p : R[X]
hp : p ≠ 0
ih : toLaurent p.reverse = invert (toLaurent p) * T ↑p.natDegree
⊢ toLaurent (p * X).reverse = invert (toLaurent (p * X)) * T ↑(p * X).natDegree
state_after: no goals
Theorem: FirstOrder.Language.Ultraproduct.sentence_realize
File: Mathlib/ModelTheory/Ultraproducts.lean

tactic: simp_rw [Sentence.Realize]
state_before: α : Type u_1
M : α → Type u_2
u : Ultrafilter α
L : Language
inst✝¹ : (a : α) → L.Structure (M a)
inst✝ : ∀ (a : α), Nonempty (M a)
φ : L.Sentence
⊢ (↑u).Product M ⊨ φ ↔ ∀ᶠ (a : α) in ↑u, M a ⊨ φ
state_after: α : Type u_1
M : α → Type u_2
u : Ultrafilter α
L : Language
inst✝¹ : (a : α) → L.Structure (M a)
inst✝ : ∀ (a : α), Nonempty (M a)
φ : L.Sentence
⊢ Formula.Realize φ default ↔ ∀ᶠ (a : α) in ↑u, Formula.Realize φ default

tactic: erw [← realize_formula_cast φ, iff_eq_eq]
state_before: α : Type u_1
M : α → Type u_2
u : Ultrafilter α
L : Language
inst✝¹ : (a : α) → L.Structure (M a)
inst✝ : ∀ (a : α), Nonempty (M a)
φ : L.Sentence
⊢ Formula.Realize φ default ↔ ∀ᶠ (a : α) in ↑u, Formula.Realize φ default
state_after: α : Type u_1
M : α → Type u_2
u : Ultrafilter α
L : Language
inst✝¹ : (a : α) → L.Structure (M a)
inst✝ : ∀ (a : α), Nonempty (M a)
φ : L.Sentence
⊢ Formula.Realize φ default = Formula.Realize φ fun i => Quotient.mk' fun a => default i

tactic: exact congr rfl (Subsingleton.elim _ _)
state_before: α : Type u_1
M : α → Type u_2
u : Ultrafilter α
L : Language
inst✝¹ : (a : α) → L.Structure (M a)
inst✝ : ∀ (a : α), Nonempty (M a)
φ : L.Sentence
⊢ Formula.Realize φ default = Formula.Realize φ fun i => Quotient.mk' fun a => default i
state_after: no goals
Theorem: Int.bitwise_diff
File: Mathlib/Data/Int/Bitwise.lean

tactic: funext m n
state_before: ⊢ (bitwise fun a b => a && !b) = ldiff
state_after: case h.h
m n : ℤ
⊢ bitwise (fun a b => a && !b) m n = m.ldiff n

tactic: cases' m with m m <;> cases' n with n n <;> try {rfl}
  <;> simp only [bitwise, natBitwise, Bool.not_false, Bool.or_true,
    cond_false, cond_true, lor, Nat.ldiff, Bool.and_true, negSucc.injEq,
    Bool.and_false, Nat.land, Bool.not_true, ldiff, Nat.lor]
state_before: case h.h
m n : ℤ
⊢ bitwise (fun a b => a && !b) m n = m.ldiff n
state_after: case h.h.ofNat.negSucc
m n : ℕ
⊢ ↑(Nat.bitwise (fun x y => x && !!y) m n) = ↑(m &&& n)

case h.h.negSucc.ofNat
m n : ℕ
⊢ Nat.bitwise (fun x y => !(!x && !y)) m n = m ||| n

case h.h.negSucc.negSucc
m n : ℕ
⊢ ↑(Nat.bitwise (fun x y => !x && !!y) m n) = ↑(Nat.bitwise (fun a b => a && !b) n m)

tactic: rfl
state_before: case h.h.ofNat.ofNat
m n : ℕ
⊢ bitwise (fun a b => a && !b) (ofNat m) (ofNat n) = (ofNat m).ldiff (ofNat n)
state_after: no goals

tactic: congr
state_before: case h.h.ofNat.negSucc
m n : ℕ
⊢ ↑(Nat.bitwise (fun x y => x && !!y) m n) = ↑(m &&& n)
state_after: case h.h.ofNat.negSucc.e_a.e_f
m n : ℕ
⊢ (fun x y => x && !!y) = and

tactic: funext x y
state_before: case h.h.ofNat.negSucc.e_a.e_f
m n : ℕ
⊢ (fun x y => x && !!y) = and
state_after: case h.h.ofNat.negSucc.e_a.e_f.h.h
m n : ℕ
x y : Bool
⊢ (x && !!y) = (x && y)

tactic: cases x <;> cases y <;> rfl
state_before: case h.h.ofNat.negSucc.e_a.e_f.h.h
m n : ℕ
x y : Bool
⊢ (x && !!y) = (x && y)
state_after: no goals

tactic: congr
state_before: case h.h.negSucc.ofNat
m n : ℕ
⊢ Nat.bitwise (fun x y => !(!x && !y)) m n = m ||| n
state_after: case h.h.negSucc.ofNat.e_f
m n : ℕ
⊢ (fun x y => !(!x && !y)) = or

tactic: funext x y
state_before: case h.h.negSucc.ofNat.e_f
m n : ℕ
⊢ (fun x y => !(!x && !y)) = or
state_after: case h.h.negSucc.ofNat.e_f.h.h
m n : ℕ
x y : Bool
⊢ (!(!x && !y)) = (x || y)

tactic: cases x <;> cases y <;> rfl
state_before: case h.h.negSucc.ofNat.e_f.h.h
m n : ℕ
x y : Bool
⊢ (!(!x && !y)) = (x || y)
state_after: no goals

tactic: rw [Nat.bitwise_swap, Function.swap]
state_before: case h.h.negSucc.negSucc
m n : ℕ
⊢ ↑(Nat.bitwise (fun x y => !x && !!y) m n) = ↑(Nat.bitwise (fun a b => a && !b) n m)
state_after: case h.h.negSucc.negSucc
m n : ℕ
⊢ ↑(Nat.bitwise (fun y x => !x && !!y) n m) = ↑(Nat.bitwise (fun a b => a && !b) n m)

tactic: congr
state_before: case h.h.negSucc.negSucc
m n : ℕ
⊢ ↑(Nat.bitwise (fun y x => !x && !!y) n m) = ↑(Nat.bitwise (fun a b => a && !b) n m)
state_after: case h.h.negSucc.negSucc.e_a.e_f
m n : ℕ
⊢ (fun y x => !x && !!y) = fun a b => a && !b

tactic: funext x y
state_before: case h.h.negSucc.negSucc.e_a.e_f
m n : ℕ
⊢ (fun y x => !x && !!y) = fun a b => a && !b
state_after: case h.h.negSucc.negSucc.e_a.e_f.h.h
m n : ℕ
x y : Bool
⊢ (!y && !!x) = (x && !y)

tactic: cases x <;> cases y <;> rfl
state_before: case h.h.negSucc.negSucc.e_a.e_f.h.h
m n : ℕ
x y : Bool
⊢ (!y && !!x) = (x && !y)
state_after: no goals