tasksource/leandojo huggingface dataset:
Theorem: indicator_ae_eq_of_restrict_compl_ae_eq_zero
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: rw [Filter.EventuallyEq, ae_restrict_iff' hs.compl] at hf
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.4814398
δ : Type ?u.4814401
ι : Type ?u.4814404
R : Type ?u.4814407
R' : Type ?u.4814410
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
s t : Set α
f : α → β
inst✝ : Zero β
hs : MeasurableSet s
hf : f =ᶠ[ae (Measure.restrict μ (sᶜ))] 0
⊢ indicator s f =ᶠ[ae μ] f

tactic: filter_upwards [hf]with x hx
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.4814398
δ : Type ?u.4814401
ι : Type ?u.4814404
R : Type ?u.4814407
R' : Type ?u.4814410
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
s t : Set α
f : α → β
inst✝ : Zero β
hs : MeasurableSet s
hf : ∀ᵐ (x : α) ∂μ, x ∈ sᶜ → f x = OfNat.ofNat 0 x
⊢ indicator s f =ᶠ[ae μ] f

tactic: by_cases hxs : x ∈ s
state_before: case h
α : Type u_1
β : Type u_2
γ : Type ?u.4814398
δ : Type ?u.4814401
ι : Type ?u.4814404
R : Type ?u.4814407
R' : Type ?u.4814410
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
s t : Set α
f : α → β
inst✝ : Zero β
hs : MeasurableSet s
hf : ∀ᵐ (x : α) ∂μ, x ∈ sᶜ → f x = OfNat.ofNat 0 x
x : α
hx : x ∈ sᶜ → f x = OfNat.ofNat 0 x
⊢ indicator s f x = f x

tactic: simp only [hxs, Set.indicator_of_mem]
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type ?u.4814398
δ : Type ?u.4814401
ι : Type ?u.4814404
R : Type ?u.4814407
R' : Type ?u.4814410
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
s t : Set α
f : α → β
inst✝ : Zero β
hs : MeasurableSet s
hf : ∀ᵐ (x : α) ∂μ, x ∈ sᶜ → f x = OfNat.ofNat 0 x
x : α
hx : x ∈ sᶜ → f x = OfNat.ofNat 0 x
hxs : x ∈ s
⊢ indicator s f x = f x

tactic: simp only [hx hxs, Pi.zero_apply, Set.indicator_apply_eq_zero, eq_self_iff_true, imp_true_iff]
state_before: case neg
α : Type u_1
β : Type u_2
γ : Type ?u.4814398
δ : Type ?u.4814401
ι : Type ?u.4814404
R : Type ?u.4814407
R' : Type ?u.4814410
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
s t : Set α
f : α → β
inst✝ : Zero β
hs : MeasurableSet s
hf : ∀ᵐ (x : α) ∂μ, x ∈ sᶜ → f x = OfNat.ofNat 0 x
x : α
hx : x ∈ sᶜ → f x = OfNat.ofNat 0 x
hxs : ¬x ∈ s
⊢ indicator s f x = f x
Theorem: Polynomial.cyclotomic'_two
File: Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean

tactic: rw [cyclotomic']
state_before: R✝ : Type ?u.35090
inst✝⁴ : CommRing R✝
inst✝³ : IsDomain R✝
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
p : ℕ
inst✝ : CharP R p
hp : p ≠ 2
⊢ cyclotomic' 2 R = X + 1

tactic: have prim_root_two : primitiveRoots 2 R = {(-1 : R)} := by
  simp only [Finset.eq_singleton_iff_unique_mem, mem_primitiveRoots two_pos]
  exact ⟨IsPrimitiveRoot.neg_one p hp, fun x => IsPrimitiveRoot.eq_neg_one_of_two_right⟩
state_before: R✝ : Type ?u.35090
inst✝⁴ : CommRing R✝
inst✝³ : IsDomain R✝
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
p : ℕ
inst✝ : CharP R p
hp : p ≠ 2
⊢ ∏ μ in primitiveRoots 2 R, (X - ↑C μ) = X + 1

tactic: simp only [prim_root_two, Finset.prod_singleton, RingHom.map_neg, RingHom.map_one, sub_neg_eq_add]
state_before: R✝ : Type ?u.35090
inst✝⁴ : CommRing R✝
inst✝³ : IsDomain R✝
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
p : ℕ
inst✝ : CharP R p
hp : p ≠ 2
prim_root_two : primitiveRoots 2 R = {-1}
⊢ ∏ μ in primitiveRoots 2 R, (X - ↑C μ) = X + 1

tactic: simp only [Finset.eq_singleton_iff_unique_mem, mem_primitiveRoots two_pos]
state_before: R✝ : Type ?u.35090
inst✝⁴ : CommRing R✝
inst✝³ : IsDomain R✝
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
p : ℕ
inst✝ : CharP R p
hp : p ≠ 2
⊢ primitiveRoots 2 R = {-1}

tactic: exact ⟨IsPrimitiveRoot.neg_one p hp, fun x => IsPrimitiveRoot.eq_neg_one_of_two_right⟩
state_before: R✝ : Type ?u.35090
inst✝⁴ : CommRing R✝
inst✝³ : IsDomain R✝
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
p : ℕ
inst✝ : CharP R p
hp : p ≠ 2
⊢ IsPrimitiveRoot (-1) 2 ∧ ∀ (x : R), IsPrimitiveRoot x 2 → x = -1
Theorem: Multiset.noncommProd_eq_pow_card
File: Mathlib/Data/Finset/NoncommProd.lean

tactic: induction s using Quotient.inductionOn
state_before: F : Type ?u.111005
ι : Type ?u.111008
α : Type u_1
β : Type ?u.111014
γ : Type ?u.111017
f : α → β → β
op : α → α → α
inst✝¹ : Monoid α
inst✝ : Monoid β
s : Multiset α
comm : Set.Pairwise {x | x ∈ s} Commute
m : α
h : ∀ (x : α), x ∈ s → x = m
⊢ noncommProd s comm = m ^ ↑card s

tactic: simp only [quot_mk_to_coe, noncommProd_coe, coe_card, mem_coe] at *
state_before: case h
F : Type ?u.111005
ι : Type ?u.111008
α : Type u_1
β : Type ?u.111014
γ : Type ?u.111017
f : α → β → β
op : α → α → α
inst✝¹ : Monoid α
inst✝ : Monoid β
m : α
a✝ : List α
comm : Set.Pairwise {x | x ∈ Quotient.mk (List.isSetoid α) a✝} Commute
h : ∀ (x : α), x ∈ Quotient.mk (List.isSetoid α) a✝ → x = m
⊢ noncommProd (Quotient.mk (List.isSetoid α) a✝) comm = m ^ ↑card (Quotient.mk (List.isSetoid α) a✝)

tactic: exact List.prod_eq_pow_card _ m h
state_before: case h
F : Type ?u.111005
ι : Type ?u.111008
α : Type u_1
β : Type ?u.111014
γ : Type ?u.111017
f : α → β → β
op : α → α → α
inst✝¹ : Monoid α
inst✝ : Monoid β
m : α
a✝ : List α
comm : Set.Pairwise {x | x ∈ Quotient.mk (List.isSetoid α) a✝} Commute
h : ∀ (x : α), x ∈ a✝ → x = m
⊢ List.prod a✝ = m ^ List.length a✝
Theorem: List.modifyLast_append
File: Mathlib/Data/List/Basic.lean

tactic: cases l₂ with
| nil => contradiction
| cons hd tl =>
  cases tl with
  | nil => exact modifyLast_append_one _ hd _
  | cons hd' tl' =>
    rw [append_cons, ←nil_append (hd :: hd' :: tl'), append_cons [], nil_append,
      modifyLast_append _ (l₁ ++ [hd]) (hd' :: tl') _, modifyLast_append _ [hd] (hd' :: tl') _,
      append_assoc]
    all_goals { exact cons_ne_nil _ _ }
state_before: ι : Type ?u.319860
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁✝ l₂✝ : List α
f : α → α
l₁ l₂ : List α
x✝ : l₂ ≠ []
⊢ modifyLast f (l₁ ++ l₂) = l₁ ++ modifyLast f l₂

tactic: contradiction
state_before: case nil
ι : Type ?u.319860
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁✝ l₂ : List α
f : α → α
l₁ : List α
x✝ : [] ≠ []
⊢ modifyLast f (l₁ ++ []) = l₁ ++ modifyLast f []

tactic: cases tl with
| nil => exact modifyLast_append_one _ hd _
| cons hd' tl' =>
  rw [append_cons, ←nil_append (hd :: hd' :: tl'), append_cons [], nil_append,
    modifyLast_append _ (l₁ ++ [hd]) (hd' :: tl') _, modifyLast_append _ [hd] (hd' :: tl') _,
    append_assoc]
  all_goals { exact cons_ne_nil _ _ }
state_before: case cons
ι : Type ?u.319860
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁✝ l₂ : List α
f : α → α
l₁ : List α
hd : α
tl : List α
x✝ : hd :: tl ≠ []
⊢ modifyLast f (l₁ ++ hd :: tl) = l₁ ++ modifyLast f (hd :: tl)

tactic: exact modifyLast_append_one _ hd _
state_before: case cons.nil
ι : Type ?u.319860
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁✝ l₂ : List α
f : α → α
l₁ : List α
hd : α
x✝ : [hd] ≠ []
⊢ modifyLast f (l₁ ++ [hd]) = l₁ ++ modifyLast f [hd]

tactic: rw [append_cons, ←nil_append (hd :: hd' :: tl'), append_cons [], nil_append,
  modifyLast_append _ (l₁ ++ [hd]) (hd' :: tl') _, modifyLast_append _ [hd] (hd' :: tl') _,
  append_assoc]
state_before: case cons.cons
ι : Type ?u.319860
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁✝ l₂ : List α
f : α → α
l₁ : List α
hd hd' : α
tl' : List α
x✝ : hd :: hd' :: tl' ≠ []
⊢ modifyLast f (l₁ ++ hd :: hd' :: tl') = l₁ ++ modifyLast f (hd :: hd' :: tl')

tactic: all_goals { exact cons_ne_nil _ _ }
state_before: ι : Type ?u.319860
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁✝ l₂ : List α
f : α → α
l₁ : List α
hd hd' : α
tl' : List α
x✝ : hd :: hd' :: tl' ≠ []
⊢ hd' :: tl' ≠ []

ι : Type ?u.319860
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁✝ l₂ : List α
f : α → α
l₁ : List α
hd hd' : α
tl' : List α
x✝ : hd :: hd' :: tl' ≠ []
⊢ hd' :: tl' ≠ []
Theorem: Dfinsupp.update_eq_erase
File: Mathlib/Data/Dfinsupp/Basic.lean

tactic: ext j
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝ : (i : ι) → Zero (β i)
s : Finset ι
x : (i : ↑↑s) → β ↑i
i : ι
f : Π₀ (i : ι), β i
b : β i
j : ι
⊢ update i f 0 = erase i f

tactic: rcases eq_or_ne i j with (rfl | hi)
state_before: case h
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝ : (i : ι) → Zero (β i)
s : Finset ι
x : (i : ↑↑s) → β ↑i
i : ι
f : Π₀ (i : ι), β i
b : β i
j✝ j : ι
⊢ ↑(update i f 0) j = ↑(erase i f) j

tactic: simp
state_before: case h.inl
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝ : (i : ι) → Zero (β i)
s : Finset ι
x : (i : ↑↑s) → β ↑i
i : ι
f : Π₀ (i : ι), β i
b : β i
j : ι
⊢ ↑(update i f 0) i = ↑(erase i f) i

tactic: simp [hi.symm]
state_before: case h.inr
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝ : (i : ι) → Zero (β i)
s : Finset ι
x : (i : ↑↑s) → β ↑i
i : ι
f : Π₀ (i : ι), β i
b : β i
j✝ j : ι
hi : i ≠ j
⊢ ↑(update i f 0) j = ↑(erase i f) j
Theorem: continuous_if
File: Mathlib/Topology/ContinuousOn.lean

tactic: rw [continuous_iff_continuousOn_univ]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.380506
δ : Type ?u.380509
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : TopologicalSpace δ
p : α → Prop
f g : α → β
inst✝ : (a : α) → Decidable (p a)
hp : ∀ (a : α), a ∈ frontier {x | p x} → f a = g a
hf : ContinuousOn f (closure {x | p x})
hg : ContinuousOn g (closure {x | ¬p x})
⊢ Continuous fun a => if p a then f a else g a

tactic: apply ContinuousOn.if <;> simp <;> assumption
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.380506
δ : Type ?u.380509
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : TopologicalSpace δ
p : α → Prop
f g : α → β
inst✝ : (a : α) → Decidable (p a)
hp : ∀ (a : α), a ∈ frontier {x | p x} → f a = g a
hf : ContinuousOn f (closure {x | p x})
hg : ContinuousOn g (closure {x | ¬p x})
⊢ ContinuousOn (fun a => if p a then f a else g a) univ
Theorem: StructureGroupoid.LocalInvariantProp.liftPropAt_of_mem_maximalAtlas
File: Mathlib/Geometry/Manifold/LocalInvariantProperties.lean

tactic: simp_rw [LiftPropAt, hG.liftPropWithinAt_indep_chart he hx G.id_mem_maximalAtlas (mem_univ _),
  (e.continuousAt hx).continuousWithinAt, true_and_iff]
state_before: H : Type u_1
M : Type u_2
H' : Type ?u.53706
M' : Type ?u.53709
X : Type ?u.53712
inst✝⁷ : TopologicalSpace H
inst✝⁶ : TopologicalSpace M
inst✝⁵ : ChartedSpace H M
inst✝⁴ : TopologicalSpace H'
inst✝³ : TopologicalSpace M'
inst✝² : ChartedSpace H' M'
inst✝¹ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
e e' : LocalHomeomorph M H
f f' : LocalHomeomorph M' H'
P : (H → H') → Set H → H → Prop
g g' : M → M'
s t : Set M
x : M
Q : (H → H) → Set H → H → Prop
hG✝ : LocalInvariantProp G G' P
inst✝ : HasGroupoid M G
hG : LocalInvariantProp G G Q
hQ : ∀ (y : H), Q id univ y
he : e ∈ maximalAtlas M G
hx : x ∈ e.source
⊢ LiftPropAt Q (↑e) x

tactic: exact hG.congr' (e.eventually_right_inverse' hx) (hQ _)
state_before: H : Type u_1
M : Type u_2
H' : Type ?u.53706
M' : Type ?u.53709
X : Type ?u.53712
inst✝⁷ : TopologicalSpace H
inst✝⁶ : TopologicalSpace M
inst✝⁵ : ChartedSpace H M
inst✝⁴ : TopologicalSpace H'
inst✝³ : TopologicalSpace M'
inst✝² : ChartedSpace H' M'
inst✝¹ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
e e' : LocalHomeomorph M H
f f' : LocalHomeomorph M' H'
P : (H → H') → Set H → H → Prop
g g' : M → M'
s t : Set M
x : M
Q : (H → H) → Set H → H → Prop
hG✝ : LocalInvariantProp G G' P
inst✝ : HasGroupoid M G
hG : LocalInvariantProp G G Q
hQ : ∀ (y : H), Q id univ y
he : e ∈ maximalAtlas M G
hx : x ∈ e.source
⊢ Q (↑(LocalHomeomorph.refl H) ∘ ↑e ∘ ↑(LocalHomeomorph.symm e)) (↑(LocalHomeomorph.symm e) ⁻¹' univ) (↑e x)
Theorem: Nat.not_coprime_zero_zero
File: Mathlib/Data/Nat/GCD/Basic.lean

tactic: simp
state_before: ⊢ ¬coprime 0 0
Theorem: FreeAbelianGroup.support_zsmul
File: Mathlib/GroupTheory/FreeAbelianGroupFinsupp.lean

tactic: ext x
state_before: X : Type u_1
k : ℤ
h : k ≠ 0
a : FreeAbelianGroup X
⊢ support (k • a) = support a

tactic: simp only [mem_support_iff, AddMonoidHom.map_zsmul]
state_before: case a
X : Type u_1
k : ℤ
h : k ≠ 0
a : FreeAbelianGroup X
x : X
⊢ x ∈ support (k • a) ↔ x ∈ support a

tactic: simp only [h, zsmul_int_int, false_or_iff, Ne.def, mul_eq_zero]
state_before: case a
X : Type u_1
k : ℤ
h : k ≠ 0
a : FreeAbelianGroup X
x : X
⊢ k • ↑(coeff x) a ≠ 0 ↔ ↑(coeff x) a ≠ 0
Theorem: AlgebraicTopology.DoldKan.P_f_0_eq
File: Mathlib/AlgebraicTopology/DoldKan/Projections.lean

tactic: induction' q with q hq
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q : ℕ
⊢ HomologicalComplex.Hom.f (P q) 0 = 𝟙 (HomologicalComplex.X K[X] 0)

tactic: rfl
state_before: case zero
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
⊢ HomologicalComplex.Hom.f (P Nat.zero) 0 = 𝟙 (HomologicalComplex.X K[X] 0)

tactic: simp only [P_succ, HomologicalComplex.add_f_apply, HomologicalComplex.comp_f,
  HomologicalComplex.id_f, id_comp, hq, Hσ_eq_zero, add_zero]
state_before: case succ
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q : ℕ
hq : HomologicalComplex.Hom.f (P q) 0 = 𝟙 (HomologicalComplex.X K[X] 0)
⊢ HomologicalComplex.Hom.f (P (Nat.succ q)) 0 = 𝟙 (HomologicalComplex.X K[X] 0)
Theorem: Filter.eventually_forall_ge_atTop
File: Mathlib/Order/Filter/AtTopBot.lean

tactic: refine ⟨fun h ↦ h.mono fun x hx ↦ hx x le_rfl, fun h ↦ ?_⟩
state_before: ι : Type ?u.17904
ι' : Type ?u.17907
α : Type u_1
β : Type ?u.17913
γ : Type ?u.17916
inst✝ : Preorder α
p : α → Prop
⊢ (∀ᶠ (x : α) in atTop, ∀ (y : α), x ≤ y → p y) ↔ ∀ᶠ (x : α) in atTop, p x

tactic: rcases (hasBasis_iInf_principal_finite _).eventually_iff.1 h with ⟨S, hSf, hS⟩
state_before: ι : Type ?u.17904
ι' : Type ?u.17907
α : Type u_1
β : Type ?u.17913
γ : Type ?u.17916
inst✝ : Preorder α
p : α → Prop
h : ∀ᶠ (x : α) in atTop, p x
⊢ ∀ᶠ (x : α) in atTop, ∀ (y : α), x ≤ y → p y

tactic: refine mem_iInf_of_iInter hSf (V := fun x ↦ Ici x.1) (fun _ ↦ Subset.rfl) fun x hx y hy ↦ ?_
state_before: case intro.intro
ι : Type ?u.17904
ι' : Type ?u.17907
α : Type u_1
β : Type ?u.17913
γ : Type ?u.17916
inst✝ : Preorder α
p : α → Prop
h : ∀ᶠ (x : α) in atTop, p x
S : Set α
hSf : Set.Finite S
hS : ∀ ⦃x : α⦄, (x ∈ ⋂ (i : α) (_ : i ∈ S), Ici i) → p x
⊢ ∀ᶠ (x : α) in atTop, ∀ (y : α), x ≤ y → p y

tactic: simp only [mem_iInter] at hS hx
state_before: case intro.intro
ι : Type ?u.17904
ι' : Type ?u.17907
α : Type u_1
β : Type ?u.17913
γ : Type ?u.17916
inst✝ : Preorder α
p : α → Prop
h : ∀ᶠ (x : α) in atTop, p x
S : Set α
hSf : Set.Finite S
hS : ∀ ⦃x : α⦄, (x ∈ ⋂ (i : α) (_ : i ∈ S), Ici i) → p x
x : α
hx : x ∈ ⋂ (i : ↑S), (fun x => Ici ↑x) i
y : α
hy : x ≤ y
⊢ p y

tactic: exact hS fun z hz ↦ le_trans (hx ⟨z, hz⟩) hy
state_before: case intro.intro
ι : Type ?u.17904
ι' : Type ?u.17907
α : Type u_1
β : Type ?u.17913
γ : Type ?u.17916
inst✝ : Preorder α
p : α → Prop
h : ∀ᶠ (x : α) in atTop, p x
S : Set α
hSf : Set.Finite S
x y : α
hy : x ≤ y
hS : ∀ ⦃x : α⦄, (∀ (i : α), i ∈ S → x ∈ Ici i) → p x
hx : ∀ (i : ↑S), x ∈ Ici ↑i
⊢ p y
Theorem: TopCat.pullback_snd_range
File: Mathlib/Topology/Category/TopCat/Limits/Pullbacks.lean

tactic: ext y
state_before: J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
g : Y ⟶ S
⊢ Set.range ((forget TopCat).map pullback.snd) = {y | ∃ x, (forget TopCat).map f x = (forget TopCat).map g y}

tactic: constructor
state_before: case h
J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
g : Y ⟶ S
y : (forget TopCat).obj Y
⊢ y ∈ Set.range ((forget TopCat).map pullback.snd) ↔ y ∈ {y | ∃ x, (forget TopCat).map f x = (forget TopCat).map g y}

tactic: rintro ⟨x, rfl⟩
state_before: case h.mp
J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
g : Y ⟶ S
y : (forget TopCat).obj Y
⊢ y ∈ Set.range ((forget TopCat).map pullback.snd) → y ∈ {y | ∃ x, (forget TopCat).map f x = (forget TopCat).map g y}

tactic: use (pullback.fst : pullback f g ⟶ _) x
state_before: case h.mp.intro
J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
g : Y ⟶ S
x : (forget TopCat).obj (pullback f g)
⊢ (forget TopCat).map pullback.snd x ∈ {y | ∃ x, (forget TopCat).map f x = (forget TopCat).map g y}

tactic: exact ConcreteCategory.congr_hom pullback.condition x
state_before: case h.mp.intro
J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
g : Y ⟶ S
x : (forget TopCat).obj (pullback f g)
⊢ (forget TopCat).map f ((forget TopCat).map pullback.fst x) =
    (forget TopCat).map g ((forget TopCat).map pullback.snd x)

tactic: rintro ⟨x, eq⟩
state_before: case h.mpr
J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
g : Y ⟶ S
y : (forget TopCat).obj Y
⊢ y ∈ {y | ∃ x, (forget TopCat).map f x = (forget TopCat).map g y} → y ∈ Set.range ((forget TopCat).map pullback.snd)

tactic: use (TopCat.pullbackIsoProdSubtype f g).inv ⟨⟨x, y⟩, eq⟩
state_before: case h.mpr.intro
J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
g : Y ⟶ S
y : (forget TopCat).obj Y
x : ↑X
eq : (forget TopCat).map f x = (forget TopCat).map g y
⊢ y ∈ Set.range ((forget TopCat).map pullback.snd)

tactic: simp
state_before: case h.mpr.intro
J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
g : Y ⟶ S
y : (forget TopCat).obj Y
x : ↑X
eq : (forget TopCat).map f x = (forget TopCat).map g y
⊢ (forget TopCat).map pullback.snd
      ((forget TopCat).map (pullbackIsoProdSubtype f g).inv { val := (x, y), property := eq }) =
    y
Theorem: FiniteField.prod_univ_units_id_eq_neg_one
File: Mathlib/FieldTheory/Finite/Basic.lean

tactic: classical
  have : (∏ x in (@univ Kˣ _).erase (-1), x) = 1 :=
    prod_involution (fun x _ => x⁻¹) (by simp)
      (fun a => by simp (config := { contextual := true }) [Units.inv_eq_self_iff])
      (fun a => by simp [@inv_eq_iff_eq_inv _ _ a]) (by simp)
  rw [← insert_erase (mem_univ (-1 : Kˣ)), prod_insert (not_mem_erase _ _), this, mul_one]
state_before: K : Type u_1
R : Type ?u.99451
inst✝² : CommRing K
inst✝¹ : IsDomain K
inst✝ : Fintype Kˣ
⊢ ∏ x : Kˣ, x = -1

tactic: have : (∏ x in (@univ Kˣ _).erase (-1), x) = 1 :=
  prod_involution (fun x _ => x⁻¹) (by simp)
    (fun a => by simp (config := { contextual := true }) [Units.inv_eq_self_iff])
    (fun a => by simp [@inv_eq_iff_eq_inv _ _ a]) (by simp)
state_before: K : Type u_1
R : Type ?u.99451
inst✝² : CommRing K
inst✝¹ : IsDomain K
inst✝ : Fintype Kˣ
⊢ ∏ x : Kˣ, x = -1

tactic: rw [← insert_erase (mem_univ (-1 : Kˣ)), prod_insert (not_mem_erase _ _), this, mul_one]
state_before: K : Type u_1
R : Type ?u.99451
inst✝² : CommRing K
inst✝¹ : IsDomain K
inst✝ : Fintype Kˣ
this : ∏ x in erase univ (-1), x = 1
⊢ ∏ x : Kˣ, x = -1

tactic: simp
state_before: K : Type u_1
R : Type ?u.99451
inst✝² : CommRing K
inst✝¹ : IsDomain K
inst✝ : Fintype Kˣ
⊢ ∀ (a : Kˣ) (ha : a ∈ erase univ (-1)), a * (fun x x_1 => x⁻¹) a ha = 1

tactic: simp (config := { contextual := true }) [Units.inv_eq_self_iff]
state_before: K : Type u_1
R : Type ?u.99451
inst✝² : CommRing K
inst✝¹ : IsDomain K
inst✝ : Fintype Kˣ
a : Kˣ
⊢ ∀ (ha : a ∈ erase univ (-1)), a ≠ 1 → (fun x x_1 => x⁻¹) a ha ≠ a

tactic: simp [@inv_eq_iff_eq_inv _ _ a]
state_before: K : Type u_1
R : Type ?u.99451
inst✝² : CommRing K
inst✝¹ : IsDomain K
inst✝ : Fintype Kˣ
a : Kˣ
⊢ ∀ (ha : a ∈ erase univ (-1)), (fun x x_1 => x⁻¹) a ha ∈ erase univ (-1)

tactic: simp
state_before: K : Type u_1
R : Type ?u.99451
inst✝² : CommRing K
inst✝¹ : IsDomain K
inst✝ : Fintype Kˣ
⊢ ∀ (a : Kˣ) (ha : a ∈ erase univ (-1)), (fun x x_1 => x⁻¹) ((fun x x_1 => x⁻¹) a ha) (_ : a⁻¹ ∈ erase univ (-1)) = a
Theorem: AddCommGroup.zsmul_modEq_zero
File: Mathlib/Algebra/ModEq.lean

tactic: simp
state_before: α : Type u_1
inst✝ : AddCommGroup α
p a a₁ a₂ b b₁ b₂ c : α
n : ℕ
z✝ z : ℤ
⊢ 0 - z • p = -z • p
Theorem: Nat.not_exists_sq
File: Mathlib/Data/Nat/Sqrt.lean

tactic: rintro ⟨t, rfl⟩
state_before: n m : ℕ
hl : m * m < n
hr : n < (m + 1) * (m + 1)
⊢ ¬∃ t, t * t = n

tactic: have h1 : m < t := Nat.mul_self_lt_mul_self_iff.mpr hl
state_before: case intro
m t : ℕ
hl : m * m < t * t
hr : t * t < (m + 1) * (m + 1)
⊢ False

tactic: have h2 : t < m + 1 := Nat.mul_self_lt_mul_self_iff.mpr hr
state_before: case intro
m t : ℕ
hl : m * m < t * t
hr : t * t < (m + 1) * (m + 1)
h1 : m < t
⊢ False

tactic: exact (not_lt_of_ge <| le_of_lt_succ h2) h1
state_before: case intro
m t : ℕ
hl : m * m < t * t
hr : t * t < (m + 1) * (m + 1)
h1 : m < t
h2 : t < m + 1
⊢ False
Theorem: Finset.Nonempty.mul_zero
File: Mathlib/Data/Finset/Pointwise.lean

tactic: simpa [mem_mul] using hs
state_before: F : Type ?u.595307
α : Type u_1
β : Type ?u.595313
γ : Type ?u.595316
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : MulZeroClass α
s t : Finset α
hs : Finset.Nonempty s
⊢ 0 ⊆ s * 0
Theorem: List.span_eq_take_drop
File: Mathlib/Data/List/Basic.lean

tactic: simpa using span.loop_eq_take_drop p l []
state_before: ι : Type ?u.385314
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
p : α → Bool
l : List α
⊢ span p l = (takeWhile p l, dropWhile p l)
Theorem: deriv_sqrt_mul_log
File: Mathlib/Analysis/Convex/SpecificFunctions/Deriv.lean

tactic: cases' lt_or_le 0 x with hx hx
state_before: x : ℝ
⊢ deriv (fun x => sqrt x * log x) x = (2 + log x) / (2 * sqrt x)

tactic: exact (hasDerivAt_sqrt_mul_log hx.ne').deriv
state_before: case inl
x : ℝ
hx : 0 < x
⊢ deriv (fun x => sqrt x * log x) x = (2 + log x) / (2 * sqrt x)

tactic: rw [sqrt_eq_zero_of_nonpos hx, MulZeroClass.mul_zero, div_zero]
state_before: case inr
x : ℝ
hx : x ≤ 0
⊢ deriv (fun x => sqrt x * log x) x = (2 + log x) / (2 * sqrt x)

tactic: refine' HasDerivWithinAt.deriv_eq_zero _ (uniqueDiffOn_Iic 0 x hx)
state_before: case inr
x : ℝ
hx : x ≤ 0
⊢ deriv (fun x => sqrt x * log x) x = 0

tactic: refine' (hasDerivWithinAt_const x _ 0).congr_of_mem (fun x hx => _) hx
state_before: case inr
x : ℝ
hx : x ≤ 0
⊢ HasDerivWithinAt (fun x => sqrt x * log x) 0 (Iic 0) x

tactic: rw [sqrt_eq_zero_of_nonpos hx, MulZeroClass.zero_mul]
state_before: case inr
x✝ : ℝ
hx✝ : x✝ ≤ 0
x : ℝ
hx : x ∈ Iic 0
⊢ sqrt x * log x = 0
Theorem: Polynomial.Chebyshev.algebraMap_eval_U
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Chebyshev.lean

tactic: rw [← aeval_algebraMap_apply_eq_algebraMap_eval, aeval_U]
state_before: R : Type u_2
A : Type u_1
inst✝² : CommRing R
inst✝¹ : CommRing A
inst✝ : Algebra R A
x : R
n : ℕ
⊢ ↑(algebraMap R A) (eval x (U R n)) = eval (↑(algebraMap R A) x) (U A n)
Theorem: Complex.cos_arg
File: Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean

tactic: rw [arg]
state_before: x : ℂ
hx : x ≠ 0
⊢ Real.cos (arg x) = x.re / ↑abs x

tactic: split_ifs with h₁ h₂
state_before: x : ℂ
hx : x ≠ 0
⊢ Real.cos
      (if 0 ≤ x.re then arcsin (x.im / ↑abs x)
      else if 0 ≤ x.im then arcsin ((-x).im / ↑abs x) + π else arcsin ((-x).im / ↑abs x) - π) =
    x.re / ↑abs x

tactic: rw [Real.cos_arcsin]
state_before: case inl
x : ℂ
hx : x ≠ 0
h₁ : 0 ≤ x.re
⊢ Real.cos (arcsin (x.im / ↑abs x)) = x.re / ↑abs x

tactic: simp [Real.sqrt_sq, (abs.pos hx).le, *, one_sub_div]
state_before: case inl
x : ℂ
hx : x ≠ 0
h₁ : 0 ≤ x.re
⊢ sqrt (1 - (x.im / ↑abs x) ^ 2) = x.re / ↑abs x

tactic: rw [Real.cos_add_pi, Real.cos_arcsin]
state_before: case inr.inl
x : ℂ
hx : x ≠ 0
h₁ : ¬0 ≤ x.re
h₂ : 0 ≤ x.im
⊢ Real.cos (arcsin ((-x).im / ↑abs x) + π) = x.re / ↑abs x

tactic: simp [Real.sqrt_div (sq_nonneg _), Real.sqrt_sq_eq_abs, _root_.abs_of_neg (not_le.1 h₁),
  *, one_sub_div, neg_div]
state_before: case inr.inl
x : ℂ
hx : x ≠ 0
h₁ : ¬0 ≤ x.re
h₂ : 0 ≤ x.im
⊢ -sqrt (1 - ((-x).im / ↑abs x) ^ 2) = x.re / ↑abs x

tactic: rw [Real.cos_sub_pi, Real.cos_arcsin]
state_before: case inr.inr
x : ℂ
hx : x ≠ 0
h₁ : ¬0 ≤ x.re
h₂ : ¬0 ≤ x.im
⊢ Real.cos (arcsin ((-x).im / ↑abs x) - π) = x.re / ↑abs x

tactic: simp [Real.sqrt_div (sq_nonneg _), Real.sqrt_sq_eq_abs, _root_.abs_of_neg (not_le.1 h₁),
  *, one_sub_div, neg_div]
state_before: case inr.inr
x : ℂ
hx : x ≠ 0
h₁ : ¬0 ≤ x.re
h₂ : ¬0 ≤ x.im
⊢ -sqrt (1 - ((-x).im / ↑abs x) ^ 2) = x.re / ↑abs x