tasksource/leandojo huggingface dataset:
Theorem: LieEquiv.symm_symm
File: Mathlib/Algebra/Lie/Basic.lean

tactic: ext
state_before: R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieRing L₂
inst✝³ : LieRing L₃
inst✝² : LieAlgebra R L₁
inst✝¹ : LieAlgebra R L₂
inst✝ : LieAlgebra R L₃
e : L₁ ≃ₗ⁅R⁆ L₂
⊢ symm (symm e) = e

tactic: rfl
state_before: case h
R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieRing L₂
inst✝³ : LieRing L₃
inst✝² : LieAlgebra R L₁
inst✝¹ : LieAlgebra R L₂
inst✝ : LieAlgebra R L₃
e : L₁ ≃ₗ⁅R⁆ L₂
x✝ : L₁
⊢ ↑(symm (symm e)) x✝ = ↑e x✝
Theorem: SimpleGraph.Path.mk'_mem_edges_singleton
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: simp [singleton]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
h : Adj G u v
⊢ Quotient.mk (Sym2.Rel.setoid V) (u, v) ∈ Walk.edges ↑(singleton h)
Theorem: piecewise_ae_eq_restrict
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: rw [ae_restrict_eq hs]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.4290136
δ : Type ?u.4290139
ι : Type ?u.4290142
R : Type ?u.4290145
R' : Type ?u.4290148
inst✝ : MeasurableSpace α
μ : MeasureTheory.Measure α
s t : Set α
f g : α → β
hs : MeasurableSet s
⊢ piecewise s f g =ᶠ[ae (Measure.restrict μ s)] f

tactic: exact (piecewise_eqOn s f g).eventuallyEq.filter_mono inf_le_right
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.4290136
δ : Type ?u.4290139
ι : Type ?u.4290142
R : Type ?u.4290145
R' : Type ?u.4290148
inst✝ : MeasurableSpace α
μ : MeasureTheory.Measure α
s t : Set α
f g : α → β
hs : MeasurableSet s
⊢ piecewise s f g =ᶠ[ae μ ⊓ 𝓟 s] f
Theorem: RatFunc.algebraMap_injective
File: Mathlib/FieldTheory/RatFunc.lean

tactic: rw [← ofFractionRing_comp_algebraMap]
state_before: K : Type u
inst✝¹ : CommRing K
inst✝ : IsDomain K
⊢ Function.Injective ↑(algebraMap K[X] (RatFunc K))

tactic: exact ofFractionRing_injective.comp (IsFractionRing.injective _ _)
state_before: K : Type u
inst✝¹ : CommRing K
inst✝ : IsDomain K
⊢ Function.Injective (ofFractionRing ∘ ↑(algebraMap K[X] (FractionRing K[X])))
Theorem: PrincipalIdealRing.isMaximal_of_irreducible
File: Mathlib/RingTheory/PrincipalIdealDomain.lean

tactic: rcases principal I with ⟨a, rfl⟩
state_before: R : Type u
M : Type v
inst✝¹ : CommRing R
inst✝ : IsPrincipalIdealRing R
p : R
hp : Irreducible p
I : Ideal R
hI : span R {p} < I
⊢ I = ⊤

tactic: erw [Ideal.span_singleton_eq_top]
state_before: case mk.intro
R : Type u
M : Type v
inst✝¹ : CommRing R
inst✝ : IsPrincipalIdealRing R
p : R
hp : Irreducible p
a : R
hI : span R {p} < span R {a}
⊢ span R {a} = ⊤

tactic: rcases Ideal.span_singleton_le_span_singleton.1 (le_of_lt hI) with ⟨b, rfl⟩
state_before: case mk.intro
R : Type u
M : Type v
inst✝¹ : CommRing R
inst✝ : IsPrincipalIdealRing R
p : R
hp : Irreducible p
a : R
hI : span R {p} < span R {a}
⊢ IsUnit a

tactic: refine' (of_irreducible_mul hp).resolve_right (mt (fun hb => _) (not_le_of_lt hI))
state_before: case mk.intro.intro
R : Type u
M : Type v
inst✝¹ : CommRing R
inst✝ : IsPrincipalIdealRing R
a b : R
hp : Irreducible (a * b)
hI : span R {a * b} < span R {a}
⊢ IsUnit a

tactic: erw [Ideal.span_singleton_le_span_singleton, IsUnit.mul_right_dvd hb]
state_before: case mk.intro.intro
R : Type u
M : Type v
inst✝¹ : CommRing R
inst✝ : IsPrincipalIdealRing R
a b : R
hp : Irreducible (a * b)
hI : span R {a * b} < span R {a}
hb : IsUnit b
⊢ span R {a} ≤ span R {a * b}
Theorem: UniformSpace.Completion.uniformity_dist'
File: Mathlib/Topology/MetricSpace/Completion.lean

tactic: ext s
state_before: α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
⊢ 𝓤 (Completion α) = ⨅ (ε : { ε // 0 < ε }), 𝓟 {p | dist p.fst p.snd < ↑ε}

tactic: rw [mem_iInf_of_directed]
state_before: case a
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
⊢ s ∈ 𝓤 (Completion α) ↔ s ∈ ⨅ (ε : { ε // 0 < ε }), 𝓟 {p | dist p.fst p.snd < ↑ε}

tactic: simp [Completion.mem_uniformity_dist, subset_def]
state_before: case a
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
⊢ s ∈ 𝓤 (Completion α) ↔ ∃ i, s ∈ 𝓟 {p | dist p.fst p.snd < ↑i}

tactic: rintro ⟨r, hr⟩ ⟨p, hp⟩
state_before: case a.h
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
⊢ Directed (fun x x_1 => x ≥ x_1) fun ε => 𝓟 {p | dist p.fst p.snd < ↑ε}

tactic: use ⟨min r p, lt_min hr hp⟩
state_before: case a.h.mk.mk
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
r : ℝ
hr : 0 < r
p : ℝ
hp : 0 < p
⊢ ∃ z,
    (fun x x_1 => x ≥ x_1) ((fun ε => 𝓟 {p | dist p.fst p.snd < ↑ε}) { val := r, property := hr })
        ((fun ε => 𝓟 {p | dist p.fst p.snd < ↑ε}) z) ∧
      (fun x x_1 => x ≥ x_1) ((fun ε => 𝓟 {p | dist p.fst p.snd < ↑ε}) { val := p, property := hp })
        ((fun ε => 𝓟 {p | dist p.fst p.snd < ↑ε}) z)

tactic: simp (config := { contextual := true }) [lt_min_iff]
state_before: case a.h.mk.mk
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
s : Set (Completion α × Completion α)
r : ℝ
hr : 0 < r
p : ℝ
hp : 0 < p
⊢ (fun x x_1 => x ≥ x_1) ((fun ε => 𝓟 {p | dist p.fst p.snd < ↑ε}) { val := r, property := hr })
      ((fun ε => 𝓟 {p | dist p.fst p.snd < ↑ε}) { val := min r p, property := (_ : 0 < min r p) }) ∧
    (fun x x_1 => x ≥ x_1) ((fun ε => 𝓟 {p | dist p.fst p.snd < ↑ε}) { val := p, property := hp })
      ((fun ε => 𝓟 {p | dist p.fst p.snd < ↑ε}) { val := min r p, property := (_ : 0 < min r p) })
Theorem: MeasureTheory.trim_eq_self
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: simp [Measure.trim]
state_before: α : Type u_1
β : Type ?u.3496189
γ : Type ?u.3496192
δ : Type ?u.3496195
ι : Type ?u.3496198
R : Type ?u.3496201
R' : Type ?u.3496204
inst✝ : MeasurableSpace α
μ : Measure α
⊢ trim μ (_ : inst✝ ≤ inst✝) = μ
Theorem: MeasureTheory.OuterMeasure.le_trim
File: Mathlib/MeasureTheory/Measure/OuterMeasure.lean

tactic: apply le_ofFunction.mpr
state_before: α : Type u_1
inst✝ : MeasurableSpace α
m : OuterMeasure α
⊢ m ≤ trim m

tactic: intro s
state_before: α : Type u_1
inst✝ : MeasurableSpace α
m : OuterMeasure α
⊢ ∀ (s : Set α), ↑m s ≤ extend (fun s x => ↑m s) s

α : Type u_1
inst✝ : MeasurableSpace α
m : OuterMeasure α
⊢ extend (fun s x => ↑m s) ∅ = 0

tactic: apply le_iInf
state_before: α : Type u_1
inst✝ : MeasurableSpace α
m : OuterMeasure α
s : Set α
⊢ ↑m s ≤ extend (fun s x => ↑m s) s

α : Type u_1
inst✝ : MeasurableSpace α
m : OuterMeasure α
⊢ extend (fun s x => ↑m s) ∅ = 0

tactic: simp
state_before: case h
α : Type u_1
inst✝ : MeasurableSpace α
m : OuterMeasure α
s : Set α
⊢ ∀ (i : (fun s => MeasurableSet s) s), ↑m s ≤ (fun s x => ↑m s) s i

α : Type u_1
inst✝ : MeasurableSpace α
m : OuterMeasure α
⊢ extend (fun s x => ↑m s) ∅ = 0

tactic: apply extend_empty <;> simp
state_before: α : Type u_1
inst✝ : MeasurableSpace α
m : OuterMeasure α
⊢ extend (fun s x => ↑m s) ∅ = 0
Theorem: AddMonoidAlgebra.mapDomain_one
File: Mathlib/Algebra/MonoidAlgebra/Basic.lean

tactic: simp_rw [one_def, mapDomain_single, map_zero]
state_before: k : Type u₁
G : Type u₂
R : Type ?u.1941628
inst✝⁴ : Semiring k
α : Type u_1
β : Type u_2
α₂ : Type u_3
inst✝³ : Semiring β
inst✝² : Zero α
inst✝¹ : Zero α₂
F : Type u_4
inst✝ : ZeroHomClass F α α₂
f : F
⊢ mapDomain (↑f) 1 = 1
Theorem: Absorbs.union
File: Mathlib/Analysis/LocallyConvex/Basic.lean

tactic: obtain ⟨a, ha, hu⟩ := hu
state_before: 𝕜 : Type u_1
𝕝 : Type ?u.2354
E : Type u_2
ι : Sort ?u.2360
κ : ι → Sort ?u.2365
inst✝¹ : SeminormedRing 𝕜
inst✝ : SMul 𝕜 E
s t u v A B : Set E
hu : Absorbs 𝕜 s u
hv : Absorbs 𝕜 s v
⊢ Absorbs 𝕜 s (u ∪ v)

tactic: obtain ⟨b, _hb, hv⟩ := hv
state_before: case intro.intro
𝕜 : Type u_1
𝕝 : Type ?u.2354
E : Type u_2
ι : Sort ?u.2360
κ : ι → Sort ?u.2365
inst✝¹ : SeminormedRing 𝕜
inst✝ : SMul 𝕜 E
s t u v A B : Set E
hv : Absorbs 𝕜 s v
a : ℝ
ha : 0 < a
hu : ∀ (a_1 : 𝕜), a ≤ ‖a_1‖ → u ⊆ a_1 • s
⊢ Absorbs 𝕜 s (u ∪ v)

tactic: exact
  ⟨max a b, lt_max_of_lt_left ha, fun c hc =>
    union_subset (hu _ <| le_of_max_le_left hc) (hv _ <| le_of_max_le_right hc)⟩
state_before: case intro.intro.intro.intro
𝕜 : Type u_1
𝕝 : Type ?u.2354
E : Type u_2
ι : Sort ?u.2360
κ : ι → Sort ?u.2365
inst✝¹ : SeminormedRing 𝕜
inst✝ : SMul 𝕜 E
s t u v A B : Set E
a : ℝ
ha : 0 < a
hu : ∀ (a_1 : 𝕜), a ≤ ‖a_1‖ → u ⊆ a_1 • s
b : ℝ
_hb : 0 < b
hv : ∀ (a : 𝕜), b ≤ ‖a‖ → v ⊆ a • s
⊢ Absorbs 𝕜 s (u ∪ v)
Theorem: PEquiv.isSome_symm_get
File: Mathlib/Data/PEquiv.lean

tactic: rw [f.eq_some_iff, some_get]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type x
f : α ≃. β
a : α
h : isSome (↑f a) = true
⊢ ↑(PEquiv.symm f) (Option.get (↑f a) h) = some a
Theorem: LinearMap.comap_leq_ker_subToSupQuotient
File: Mathlib/LinearAlgebra/Isomorphisms.lean

tactic: rw [LinearMap.ker_comp, Submodule.ofLe, comap_codRestrict, ker_mkQ, map_comap_subtype]
state_before: R : Type u_1
M : Type u_2
M₂ : Type ?u.39830
M₃ : Type ?u.39833
inst✝⁶ : Ring R
inst✝⁵ : AddCommGroup M
inst✝⁴ : AddCommGroup M₂
inst✝³ : AddCommGroup M₃
inst✝² : Module R M
inst✝¹ : Module R M₂
inst✝ : Module R M₃
f : M →ₗ[R] M₂
p p' : Submodule R M
⊢ comap (Submodule.subtype p) (p ⊓ p') ≤ ker (subToSupQuotient p p')

tactic: exact comap_mono (inf_le_inf_right _ le_sup_left)
state_before: R : Type u_1
M : Type u_2
M₂ : Type ?u.39830
M₃ : Type ?u.39833
inst✝⁶ : Ring R
inst✝⁵ : AddCommGroup M
inst✝⁴ : AddCommGroup M₂
inst✝³ : AddCommGroup M₃
inst✝² : Module R M
inst✝¹ : Module R M₂
inst✝ : Module R M₃
f : M →ₗ[R] M₂
p p' : Submodule R M
⊢ comap (Submodule.subtype p) (p ⊓ p') ≤ comap (Submodule.subtype p) ((p ⊔ p') ⊓ p')
Theorem: Mathlib.Meta.NormNum.IsRat.to_raw_eq
File: Mathlib/Tactic/NormNum/Core.lean

tactic: simp [div_eq_mul_inv]
state_before: α : Type u_1
n : ℤ
d : ℕ
inst✝ : DivisionRing α
inv : Invertible ↑d
⊢ ↑n * ⅟↑d = Rat.rawCast n d
Theorem: Polynomial.nextCoeff_C_eq_zero
File: Mathlib/Data/Polynomial/Degree/Definitions.lean

tactic: rw [nextCoeff]
state_before: R : Type u
S : Type v
a b c✝ d : R
n m : ℕ
inst✝ : Semiring R
c : R
⊢ nextCoeff (↑C c) = 0

tactic: simp
state_before: R : Type u
S : Type v
a b c✝ d : R
n m : ℕ
inst✝ : Semiring R
c : R
⊢ (if natDegree (↑C c) = 0 then 0 else coeff (↑C c) (natDegree (↑C c) - 1)) = 0
Theorem: isChain_univ_iff
File: Mathlib/Order/Chain.lean

tactic: refine' ⟨fun h => ⟨fun a b => _⟩, fun h => @isChain_of_trichotomous _ _ h univ⟩
state_before: α : Type u_1
β : Type ?u.3513
r : α → α → Prop
c c₁ c₂ c₃ s t : Set α
a b x y : α
⊢ IsChain r univ ↔ IsTrichotomous α r

tactic: rw [or_left_comm, or_iff_not_imp_left]
state_before: α : Type u_1
β : Type ?u.3513
r : α → α → Prop
c c₁ c₂ c₃ s t : Set α
a✝ b✝ x y : α
h : IsChain r univ
a b : α
⊢ r a b ∨ a = b ∨ r b a

tactic: exact h trivial trivial
state_before: α : Type u_1
β : Type ?u.3513
r : α → α → Prop
c c₁ c₂ c₃ s t : Set α
a✝ b✝ x y : α
h : IsChain r univ
a b : α
⊢ ¬a = b → r a b ∨ r b a
Theorem: List.filter_cons_of_pos
File: Std/Data/List/Lemmas.lean

tactic: rw [filter, pa]
state_before: α : Type u_1
p : α → Bool
a : α
l : List α
pa : p a = true
⊢ filter p (a :: l) = a :: filter p l
Theorem: FormalMultilinearSeries.radius_neg
File: Mathlib/Analysis/Analytic/Basic.lean

tactic: simp only [radius, neg_apply, norm_neg]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type ?u.274675
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
p✝ : FormalMultilinearSeries 𝕜 E F
r : ℝ≥0
p : FormalMultilinearSeries 𝕜 E F
⊢ radius (-p) = radius p
Theorem: Cycle.prev_mem
File: Mathlib/Data/List/Cycle.lean

tactic: rw [← next_reverse_eq_prev, ← mem_reverse_iff]
state_before: α : Type u_1
inst✝ : DecidableEq α
s : Cycle α
hs : Nodup s
x : α
hx : x ∈ s
⊢ prev s hs x hx ∈ s

tactic: apply next_mem
state_before: α : Type u_1
inst✝ : DecidableEq α
s : Cycle α
hs : Nodup s
x : α
hx : x ∈ s
⊢ next (reverse s) (_ : Nodup (reverse s)) x (_ : x ∈ reverse s) ∈ reverse s
Theorem: IsLocalizedModule.fromLocalizedModule'_smul
File: Mathlib/Algebra/Module/LocalizedModule.lean

tactic: intro a b
state_before: R : Type u_1
inst✝⁷ : CommRing R
S : Submonoid R
M : Type u_2
M' : Type u_3
M'' : Type ?u.645266
inst✝⁶ : AddCommMonoid M
inst✝⁵ : AddCommMonoid M'
inst✝⁴ : AddCommMonoid M''
inst✝³ : Module R M
inst✝² : Module R M'
inst✝¹ : Module R M''
f : M →ₗ[R] M'
g : M →ₗ[R] M''
inst✝ : IsLocalizedModule S f
r : R
x : LocalizedModule S M
⊢ ∀ (m : M) (s : { x // x ∈ S }),
    r • fromLocalizedModule' S f (LocalizedModule.mk m s) = fromLocalizedModule' S f (r • LocalizedModule.mk m s)

tactic: rw [fromLocalizedModule'_mk, LocalizedModule.smul'_mk, fromLocalizedModule'_mk]
state_before: R : Type u_1
inst✝⁷ : CommRing R
S : Submonoid R
M : Type u_2
M' : Type u_3
M'' : Type ?u.645266
inst✝⁶ : AddCommMonoid M
inst✝⁵ : AddCommMonoid M'
inst✝⁴ : AddCommMonoid M''
inst✝³ : Module R M
inst✝² : Module R M'
inst✝¹ : Module R M''
f : M →ₗ[R] M'
g : M →ₗ[R] M''
inst✝ : IsLocalizedModule S f
r : R
x : LocalizedModule S M
a : M
b : { x // x ∈ S }
⊢ r • fromLocalizedModule' S f (LocalizedModule.mk a b) = fromLocalizedModule' S f (r • LocalizedModule.mk a b)

tactic: rw [f.map_smul, map_smul]
state_before: R : Type u_1
inst✝⁷ : CommRing R
S : Submonoid R
M : Type u_2
M' : Type u_3
M'' : Type ?u.645266
inst✝⁶ : AddCommMonoid M
inst✝⁵ : AddCommMonoid M'
inst✝⁴ : AddCommMonoid M''
inst✝³ : Module R M
inst✝² : Module R M'
inst✝¹ : Module R M''
f : M →ₗ[R] M'
g : M →ₗ[R] M''
inst✝ : IsLocalizedModule S f
r : R
x : LocalizedModule S M
a : M
b : { x // x ∈ S }
⊢ r • ↑↑(IsUnit.unit (_ : IsUnit (↑(algebraMap R (Module.End R M')) ↑b)))⁻¹ (↑f a) =
    ↑↑(IsUnit.unit (_ : IsUnit (↑(algebraMap R (Module.End R M')) ↑b)))⁻¹ (↑f (r • a))
Theorem: List.filter_cons_of_neg
File: Std/Data/List/Lemmas.lean

tactic: rw [filter, eq_false_of_ne_true pa]
state_before: α : Type u_1
p : α → Bool
a : α
l : List α
pa : ¬p a = true
⊢ filter p (a :: l) = filter p l
Theorem: Trivialization.zeroSection
File: Mathlib/Topology/VectorBundle/Basic.lean

tactic: simp_rw [zeroSection, totalSpaceMk, e.apply_eq_prod_continuousLinearEquivAt R x hx 0, map_zero]
state_before: R : Type u_4
B : Type u_1
F : Type u_2
E : B → Type u_3
inst✝⁹ : NontriviallyNormedField R
inst✝⁸ : (x : B) → AddCommMonoid (E x)
inst✝⁷ : (x : B) → Module R (E x)
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace R F
inst✝⁴ : TopologicalSpace B
inst✝³ : TopologicalSpace (TotalSpace E)
inst✝² : (x : B) → TopologicalSpace (E x)
inst✝¹ : FiberBundle F E
e : Trivialization F TotalSpace.proj
inst✝ : Trivialization.IsLinear R e
x : B
hx : x ∈ e.baseSet
⊢ ↑e (zeroSection E x) = (x, 0)
Theorem: MeasureTheory.ae_withDensity_iff_ae_restrict
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: rw [ae_withDensity_iff hf, ae_restrict_iff']
state_before: α : Type u_1
β : Type ?u.1777451
γ : Type ?u.1777454
δ : Type ?u.1777457
m : MeasurableSpace α
μ ν : Measure α
p : α → Prop
f : α → ℝ≥0∞
hf : Measurable f
⊢ (∀ᵐ (x : α) ∂withDensity μ f, p x) ↔ ∀ᵐ (x : α) ∂Measure.restrict μ {x | f x ≠ 0}, p x

tactic: rfl
state_before: α : Type u_1
β : Type ?u.1777451
γ : Type ?u.1777454
δ : Type ?u.1777457
m : MeasurableSpace α
μ ν : Measure α
p : α → Prop
f : α → ℝ≥0∞
hf : Measurable f
⊢ (∀ᵐ (x : α) ∂μ, f x ≠ 0 → p x) ↔ ∀ᵐ (x : α) ∂μ, x ∈ {x | f x ≠ 0} → p x

tactic: exact hf (measurableSet_singleton 0).compl
state_before: α : Type u_1
β : Type ?u.1777451
γ : Type ?u.1777454
δ : Type ?u.1777457
m : MeasurableSpace α
μ ν : Measure α
p : α → Prop
f : α → ℝ≥0∞
hf : Measurable f
⊢ MeasurableSet {x | f x ≠ 0}
Theorem: EuclideanDomain.xgcd_zero_left
File: Mathlib/Algebra/EuclideanDomain/Defs.lean

tactic: unfold xgcdAux
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
s t r' s' t' : R
⊢ xgcdAux 0 s t r' s' t' = (r', s', t')

tactic: exact if_pos rfl
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
s t r' s' t' : R
⊢ (let r := 0;
      fun s t r' s' t' =>
      if _hr : r = 0 then (r', s', t')
      else
        let q := r' / r;
        xgcdAux (r' % r) (s' - q * s) (t' - q * t) r s t)
      s t r' s' t' =
    (r', s', t')
Theorem: Complex.cos_nat_mul_two_pi_sub_pi
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

tactic: simpa only [cos_zero] using (cos_periodic.nat_mul n).sub_antiperiod_eq cos_antiperiodic
state_before: n : ℕ
⊢ cos (↑n * (2 * ↑π) - ↑π) = -1
Theorem: Rat.mul_one
File: Std/Data/Rat/Lemmas.lean

tactic: simp [mul_def, normalize_self]
state_before: a : Rat
⊢ a * 1 = a
Theorem: Partrec.rfind
File: Mathlib/Computability/Partrec.lean

tactic: cases' e : decode (α := α) n with a <;> simp [e, Nat.rfind_zero_none, map_id']
state_before: α : Type u_1
β : Type ?u.111231
γ : Type ?u.111234
σ : Type ?u.111237
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
p : α → ℕ →. Bool
hp : Partrec₂ p
n : ℕ
⊢ (Nat.rfind fun n_1 =>
      (fun m => decide (m = 0)) <$>
        Part.bind ↑(decode (Nat.pair n n_1)) fun a =>
          Part.map encode ((fun a => Part.map (fun b => bif (a, b).snd then 0 else 1) (p a.fst a.snd)) a)) =
    Part.bind ↑(decode n) fun a => Part.map encode ((fun a => Nat.rfind (p a)) a)

tactic: congr
state_before: case some
α : Type u_1
β : Type ?u.111231
γ : Type ?u.111234
σ : Type ?u.111237
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
p : α → ℕ →. Bool
hp : Partrec₂ p
n : ℕ
a : α
e : decode n = Option.some a
⊢ (Nat.rfind fun n => Part.map (fun m => decide (m = 0)) (Part.map (fun b => bif b then 0 else 1) (p a n))) =
    Nat.rfind (p a)

tactic: funext n
state_before: case some.e_p
α : Type u_1
β : Type ?u.111231
γ : Type ?u.111234
σ : Type ?u.111237
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
p : α → ℕ →. Bool
hp : Partrec₂ p
n : ℕ
a : α
e : decode n = Option.some a
⊢ (fun n => Part.map (fun m => decide (m = 0)) (Part.map (fun b => bif b then 0 else 1) (p a n))) = p a

tactic: refine map_id' (fun b => ?_) _
state_before: case some.e_p.h
α : Type u_1
β : Type ?u.111231
γ : Type ?u.111234
σ : Type ?u.111237
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
p : α → ℕ →. Bool
hp : Partrec₂ p
n✝ : ℕ
a : α
e : decode n✝ = Option.some a
n : ℕ
⊢ Part.map (fun x => decide ((bif x then 0 else 1) = 0)) (p a n) = p a n

tactic: cases b <;> rfl
state_before: case some.e_p.h
α : Type u_1
β : Type ?u.111231
γ : Type ?u.111234
σ : Type ?u.111237
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
p : α → ℕ →. Bool
hp : Partrec₂ p
n✝ : ℕ
a : α
e : decode n✝ = Option.some a
n : ℕ
b : Bool
⊢ decide ((bif b then 0 else 1) = 0) = b
Theorem: CategoryTheory.Subobject.ind
File: Mathlib/CategoryTheory/Subobject/Basic.lean

tactic: apply Quotient.inductionOn'
state_before: C : Type u₁
inst✝¹ : Category C
X✝ Y Z : C
D : Type u₂
inst✝ : Category D
X : C
p : Subobject X → Prop
h : ∀ ⦃A : C⦄ (f : A ⟶ X) [inst : Mono f], p (mk f)
P : Subobject X
⊢ p P

tactic: intro a
state_before: case h
C : Type u₁
inst✝¹ : Category C
X✝ Y Z : C
D : Type u₂
inst✝ : Category D
X : C
p : Subobject X → Prop
h : ∀ ⦃A : C⦄ (f : A ⟶ X) [inst : Mono f], p (mk f)
P : Subobject X
⊢ ∀ (a : MonoOver X), p (Quotient.mk'' a)

tactic: exact h a.arrow
state_before: case h
C : Type u₁
inst✝¹ : Category C
X✝ Y Z : C
D : Type u₂
inst✝ : Category D
X : C
p : Subobject X → Prop
h : ∀ ⦃A : C⦄ (f : A ⟶ X) [inst : Mono f], p (mk f)
P : Subobject X
a : MonoOver X
⊢ p (Quotient.mk'' a)
Theorem: Set.iUnion_accumulate
File: Mathlib/Data/Set/Accumulate.lean

tactic: apply Subset.antisymm
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.1917
s : α → Set β
t : α → Set γ
inst✝ : Preorder α
⊢ (⋃ (x : α), Accumulate s x) = ⋃ (x : α), s x

tactic: simp only [subset_def, mem_iUnion, exists_imp, mem_accumulate]
state_before: case h₁
α : Type u_1
β : Type u_2
γ : Type ?u.1917
s : α → Set β
t : α → Set γ
inst✝ : Preorder α
⊢ (⋃ (x : α), Accumulate s x) ⊆ ⋃ (x : α), s x

tactic: intro z x x' ⟨_, hz⟩
state_before: case h₁
α : Type u_1
β : Type u_2
γ : Type ?u.1917
s : α → Set β
t : α → Set γ
inst✝ : Preorder α
⊢ ∀ (x : β) (x_1 x_2 : α), x_2 ≤ x_1 ∧ x ∈ s x_2 → ∃ i, x ∈ s i

tactic: exact ⟨x', hz⟩
state_before: case h₁
α : Type u_1
β : Type u_2
γ : Type ?u.1917
s : α → Set β
t : α → Set γ
inst✝ : Preorder α
z : β
x x' : α
left✝ : x' ≤ x
hz : z ∈ s x'
⊢ ∃ i, z ∈ s i

tactic: exact iUnion_mono fun i => subset_accumulate
state_before: case h₂
α : Type u_1
β : Type u_2
γ : Type ?u.1917
s : α → Set β
t : α → Set γ
inst✝ : Preorder α
⊢ (⋃ (x : α), s x) ⊆ ⋃ (x : α), Accumulate s x
Theorem: Submodule.span_smul_le
File: Mathlib/LinearAlgebra/Span.lean

tactic: rw [span_le]
state_before: R : Type u_2
R₂ : Type ?u.66685
K : Type ?u.66688
M : Type u_1
M₂ : Type ?u.66694
V : Type ?u.66697
S : Type ?u.66700
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
x : M
p p' : Submodule R M
inst✝² : Semiring R₂
σ₁₂ : R →+* R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
s✝ t s : Set M
r : R
⊢ span R (r • s) ≤ span R s

tactic: rintro _ ⟨x, hx, rfl⟩
state_before: R : Type u_2
R₂ : Type ?u.66685
K : Type ?u.66688
M : Type u_1
M₂ : Type ?u.66694
V : Type ?u.66697
S : Type ?u.66700
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
x : M
p p' : Submodule R M
inst✝² : Semiring R₂
σ₁₂ : R →+* R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
s✝ t s : Set M
r : R
⊢ r • s ⊆ ↑(span R s)

tactic: exact smul_mem (span R s) r (subset_span hx)
state_before: case intro.intro
R : Type u_2
R₂ : Type ?u.66685
K : Type ?u.66688
M : Type u_1
M₂ : Type ?u.66694
V : Type ?u.66697
S : Type ?u.66700
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
x✝ : M
p p' : Submodule R M
inst✝² : Semiring R₂
σ₁₂ : R →+* R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
s✝ t s : Set M
r : R
x : M
hx : x ∈ s
⊢ (fun x => r • x) x ∈ ↑(span R s)
Theorem: HasSum.sigma_of_hasSum
File: Mathlib/Topology/Algebra/InfiniteSum/Basic.lean

tactic: simpa [(hf'.hasSum.sigma hf).unique ha] using hf'.hasSum
state_before: α : Type u_1
β : Type u_3
γ✝ : Type ?u.282136
δ : Type ?u.282139
inst✝³ : AddCommMonoid α
inst✝² : TopologicalSpace α
f✝ g✝ : β → α
a✝ b : α
s : Finset β
inst✝¹ : ContinuousAdd α
inst✝ : T3Space α
γ : β → Type u_2
f : (b : β) × γ b → α
g : β → α
a : α
ha : HasSum g a
hf : ∀ (b : β), HasSum (fun c => f { fst := b, snd := c }) (g b)
hf' : Summable f
⊢ HasSum f a
Theorem: Finsupp.single_eq_set_indicator
File: Mathlib/Data/Finsupp/Defs.lean

tactic: classical
ext
simp [single_apply, Set.indicator, @eq_comm _ a]
state_before: α : Type u_1
β : Type ?u.39862
γ : Type ?u.39865
ι : Type ?u.39868
M : Type u_2
M' : Type ?u.39874
N : Type ?u.39877
P : Type ?u.39880
G : Type ?u.39883
H : Type ?u.39886
R : Type ?u.39889
S : Type ?u.39892
inst✝ : Zero M
a a' : α
b : M
⊢ ↑(single a b) = Set.indicator {a} fun x => b

tactic: ext
state_before: α : Type u_1
β : Type ?u.39862
γ : Type ?u.39865
ι : Type ?u.39868
M : Type u_2
M' : Type ?u.39874
N : Type ?u.39877
P : Type ?u.39880
G : Type ?u.39883
H : Type ?u.39886
R : Type ?u.39889
S : Type ?u.39892
inst✝ : Zero M
a a' : α
b : M
⊢ ↑(single a b) = Set.indicator {a} fun x => b

tactic: simp [single_apply, Set.indicator, @eq_comm _ a]
state_before: case h
α : Type u_1
β : Type ?u.39862
γ : Type ?u.39865
ι : Type ?u.39868
M : Type u_2
M' : Type ?u.39874
N : Type ?u.39877
P : Type ?u.39880
G : Type ?u.39883
H : Type ?u.39886
R : Type ?u.39889
S : Type ?u.39892
inst✝ : Zero M
a a' : α
b : M
x✝ : α
⊢ ↑(single a b) x✝ = Set.indicator {a} (fun x => b) x✝