tasksource/leandojo huggingface dataset:
Theorem: AddCircle.addOrderOf_coe_rat
File: Mathlib/Topology/Instances/AddCircle.lean

tactic: have : (↑(q.den : ℤ) : 𝕜) ≠ 0 := by
  norm_cast
  exact q.pos.ne.symm
state_before: 𝕜 : Type u_1
B : Type ?u.192515
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
p q✝ : 𝕜
hp : Fact (0 < p)
q : ℚ
⊢ addOrderOf ↑(↑q * p) = q.den

tactic: rw [← @Rat.num_den q, Rat.cast_mk_of_ne_zero _ _ this, Int.cast_ofNat, Rat.num_den,
  addOrderOf_div_of_gcd_eq_one' q.pos q.reduced]
state_before: 𝕜 : Type u_1
B : Type ?u.192515
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
p q✝ : 𝕜
hp : Fact (0 < p)
q : ℚ
this : ↑↑q.den ≠ 0
⊢ addOrderOf ↑(↑q * p) = q.den

tactic: norm_cast
state_before: 𝕜 : Type u_1
B : Type ?u.192515
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
p q✝ : 𝕜
hp : Fact (0 < p)
q : ℚ
⊢ ↑↑q.den ≠ 0

tactic: exact q.pos.ne.symm
state_before: 𝕜 : Type u_1
B : Type ?u.192515
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
p q✝ : 𝕜
hp : Fact (0 < p)
q : ℚ
⊢ ¬q.den = 0
Theorem: Std.OrientedCmp.cmp_eq_eq_symm
File: Std/Classes/Order.lean

tactic: rw [← Ordering.swap_inj, symm]
state_before: α✝ : Sort u_1
cmp : α✝ → α✝ → Ordering
x y : α✝
inst✝ : OrientedCmp cmp
⊢ cmp x y = Ordering.eq ↔ cmp y x = Ordering.eq

tactic: exact .rfl
state_before: α✝ : Sort u_1
cmp : α✝ → α✝ → Ordering
x y : α✝
inst✝ : OrientedCmp cmp
⊢ cmp y x = Ordering.swap Ordering.eq ↔ cmp y x = Ordering.eq
Theorem: ZFSet.toSet_image
File: Mathlib/SetTheory/ZFC/Basic.lean

tactic: ext
state_before: f : ZFSet → ZFSet
H : Definable 1 f
x : ZFSet
⊢ toSet (image f x) = f '' toSet x

tactic: simp
state_before: case h
f : ZFSet → ZFSet
H : Definable 1 f
x x✝ : ZFSet
⊢ x✝ ∈ toSet (image f x) ↔ x✝ ∈ f '' toSet x
Theorem: LocalHomeomorph.continuousAt_iff_continuousAt_comp_right
File: Mathlib/Topology/LocalHomeomorph.lean

tactic: rw [← continuousWithinAt_univ, e.continuousWithinAt_iff_continuousWithinAt_comp_right h,
  preimage_univ, continuousWithinAt_univ]
state_before: α : Type u_2
β : Type u_1
γ : Type u_3
δ : Type ?u.99038
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
e : LocalHomeomorph α β
e' : LocalHomeomorph β γ
f : β → γ
x : β
h : x ∈ e.target
⊢ ContinuousAt f x ↔ ContinuousAt (f ∘ ↑e) (↑(LocalHomeomorph.symm e) x)
Theorem: Int.ModEq.add
File: Mathlib/Data/Int/ModEq.lean

tactic: convert dvd_add h₁.dvd h₂.dvd using 1
state_before: m n a b c d : ℤ
h₁ : a ≡ b [ZMOD n]
h₂ : c ≡ d [ZMOD n]
⊢ n ∣ b + d - (a + c)

tactic: ring
state_before: case h.e'_4
m n a b c d : ℤ
h₁ : a ≡ b [ZMOD n]
h₂ : c ≡ d [ZMOD n]
⊢ b + d - (a + c) = b - a + (d - c)
Theorem: List.isRotated_reverse_iff
File: Mathlib/Data/List/Rotate.lean

tactic: simp [isRotated_reverse_comm_iff]
state_before: α : Type u
l l' : List α
⊢ reverse l ~r reverse l' ↔ l ~r l'
Theorem: Set.sigma_insert
File: Mathlib/Data/Set/Sigma.lean

tactic: simp_rw [insert_eq, sigma_union, sigma_singleton]
state_before: ι : Type u_1
ι' : Type ?u.10187
α : ι → Type u_2
β : ι → Type ?u.10197
s s₁ s₂ : Set ι
t t₁ t₂ : (i : ι) → Set (α i)
u : Set ((i : ι) × α i)
x : (i : ι) × α i
i j : ι
a✝ : α i
a : (i : ι) → α i
⊢ (Set.Sigma s fun i => insert (a i) (t i)) = (fun i => { fst := i, snd := a i }) '' s ∪ Set.Sigma s t
Theorem: ZMod.χ₄_int_one_mod_four
File: Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean

tactic: rw [χ₄_int_mod_four, hn]
state_before: n : ℤ
hn : n % 4 = 1
⊢ ↑χ₄ ↑n = 1

tactic: rfl
state_before: n : ℤ
hn : n % 4 = 1
⊢ ↑χ₄ ↑1 = 1
Theorem: Relation.acc_of_singleton
File: Mathlib/Logic/Hydra.lean

tactic: induction s using Multiset.induction
state_before: α : Type u_1
r : α → α → Prop
inst✝ : IsIrrefl α r
s : Multiset α
hs : ∀ (a : α), a ∈ s → Acc (CutExpand r) {a}
⊢ Acc (CutExpand r) s

tactic: case empty => exact Acc.intro 0 fun s h ↦ (not_cutExpand_zero s h).elim
state_before: case empty
α : Type u_1
r : α → α → Prop
inst✝ : IsIrrefl α r
hs : ∀ (a : α), a ∈ 0 → Acc (CutExpand r) {a}
⊢ Acc (CutExpand r) 0

case cons
α : Type u_1
r : α → α → Prop
inst✝ : IsIrrefl α r
a✝¹ : α
s✝ : Multiset α
a✝ : (∀ (a : α), a ∈ s✝ → Acc (CutExpand r) {a}) → Acc (CutExpand r) s✝
hs : ∀ (a : α), a ∈ a✝¹ ::ₘ s✝ → Acc (CutExpand r) {a}
⊢ Acc (CutExpand r) (a✝¹ ::ₘ s✝)

tactic: case cons a s ihs =>
  rw [← s.singleton_add a]
  rw [forall_mem_cons] at hs
  exact (hs.1.prod_gameAdd <| ihs fun a ha ↦ hs.2 a ha).of_fibration _ (cutExpand_fibration r)
state_before: case cons
α : Type u_1
r : α → α → Prop
inst✝ : IsIrrefl α r
a✝¹ : α
s✝ : Multiset α
a✝ : (∀ (a : α), a ∈ s✝ → Acc (CutExpand r) {a}) → Acc (CutExpand r) s✝
hs : ∀ (a : α), a ∈ a✝¹ ::ₘ s✝ → Acc (CutExpand r) {a}
⊢ Acc (CutExpand r) (a✝¹ ::ₘ s✝)

tactic: exact Acc.intro 0 fun s h ↦ (not_cutExpand_zero s h).elim
state_before: α : Type u_1
r : α → α → Prop
inst✝ : IsIrrefl α r
hs : ∀ (a : α), a ∈ 0 → Acc (CutExpand r) {a}
⊢ Acc (CutExpand r) 0

tactic: rw [← s.singleton_add a]
state_before: α : Type u_1
r : α → α → Prop
inst✝ : IsIrrefl α r
a : α
s : Multiset α
ihs : (∀ (a : α), a ∈ s → Acc (CutExpand r) {a}) → Acc (CutExpand r) s
hs : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Acc (CutExpand r) {a_1}
⊢ Acc (CutExpand r) (a ::ₘ s)

tactic: rw [forall_mem_cons] at hs
state_before: α : Type u_1
r : α → α → Prop
inst✝ : IsIrrefl α r
a : α
s : Multiset α
ihs : (∀ (a : α), a ∈ s → Acc (CutExpand r) {a}) → Acc (CutExpand r) s
hs : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Acc (CutExpand r) {a_1}
⊢ Acc (CutExpand r) ({a} + s)

tactic: exact (hs.1.prod_gameAdd <| ihs fun a ha ↦ hs.2 a ha).of_fibration _ (cutExpand_fibration r)
state_before: α : Type u_1
r : α → α → Prop
inst✝ : IsIrrefl α r
a : α
s : Multiset α
ihs : (∀ (a : α), a ∈ s → Acc (CutExpand r) {a}) → Acc (CutExpand r) s
hs : Acc (CutExpand r) {a} ∧ ∀ (x : α), x ∈ s → Acc (CutExpand r) {x}
⊢ Acc (CutExpand r) ({a} + s)
Theorem: CategoryTheory.Subobject.eq_of_le_of_isDetecting
File: Mathlib/CategoryTheory/Generator.lean

tactic: suffices IsIso (ofLE _ _ h₁) by exact le_antisymm h₁ (le_of_comm (inv (ofLE _ _ h₁)) (by simp))
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
𝒢 : Set C
h𝒢 : IsDetecting 𝒢
X : C
P Q : Subobject X
h₁ : P ≤ Q
h₂ : ∀ (G : C), G ∈ 𝒢 → ∀ {f : G ⟶ X}, Factors Q f → Factors P f
⊢ P = Q

tactic: refine' h𝒢 _ fun G hG f => _
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
𝒢 : Set C
h𝒢 : IsDetecting 𝒢
X : C
P Q : Subobject X
h₁ : P ≤ Q
h₂ : ∀ (G : C), G ∈ 𝒢 → ∀ {f : G ⟶ X}, Factors Q f → Factors P f
⊢ IsIso (ofLE P Q h₁)

tactic: have : P.Factors (f ≫ Q.arrow) := h₂ _ hG ((factors_iff _ _).2 ⟨_, rfl⟩)
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
𝒢 : Set C
h𝒢 : IsDetecting 𝒢
X : C
P Q : Subobject X
h₁ : P ≤ Q
h₂ : ∀ (G : C), G ∈ 𝒢 → ∀ {f : G ⟶ X}, Factors Q f → Factors P f
G : C
hG : G ∈ 𝒢
f : G ⟶ underlying.obj Q
⊢ ∃! h', h' ≫ ofLE P Q h₁ = f

tactic: refine' ⟨factorThru _ _ this, _, fun g (hg : g ≫ _ = f) => _⟩
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
𝒢 : Set C
h𝒢 : IsDetecting 𝒢
X : C
P Q : Subobject X
h₁ : P ≤ Q
h₂ : ∀ (G : C), G ∈ 𝒢 → ∀ {f : G ⟶ X}, Factors Q f → Factors P f
G : C
hG : G ∈ 𝒢
f : G ⟶ underlying.obj Q
this : Factors P (f ≫ arrow Q)
⊢ ∃! h', h' ≫ ofLE P Q h₁ = f

tactic: exact le_antisymm h₁ (le_of_comm (inv (ofLE _ _ h₁)) (by simp))
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
𝒢 : Set C
h𝒢 : IsDetecting 𝒢
X : C
P Q : Subobject X
h₁ : P ≤ Q
h₂ : ∀ (G : C), G ∈ 𝒢 → ∀ {f : G ⟶ X}, Factors Q f → Factors P f
this : IsIso (ofLE P Q h₁)
⊢ P = Q

tactic: simp
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
𝒢 : Set C
h𝒢 : IsDetecting 𝒢
X : C
P Q : Subobject X
h₁ : P ≤ Q
h₂ : ∀ (G : C), G ∈ 𝒢 → ∀ {f : G ⟶ X}, Factors Q f → Factors P f
this : IsIso (ofLE P Q h₁)
⊢ inv (ofLE P Q h₁) ≫ arrow P = arrow Q

tactic: simp only [← cancel_mono Q.arrow, Category.assoc, ofLE_arrow, factorThru_arrow]
state_before: case refine'_1
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
𝒢 : Set C
h𝒢 : IsDetecting 𝒢
X : C
P Q : Subobject X
h₁ : P ≤ Q
h₂ : ∀ (G : C), G ∈ 𝒢 → ∀ {f : G ⟶ X}, Factors Q f → Factors P f
G : C
hG : G ∈ 𝒢
f : G ⟶ underlying.obj Q
this : Factors P (f ≫ arrow Q)
⊢ (fun h' => h' ≫ ofLE P Q h₁ = f) (factorThru P (f ≫ arrow Q) this)

tactic: simp only [← cancel_mono (Subobject.ofLE _ _ h₁), ← cancel_mono Q.arrow, hg, Category.assoc,
  ofLE_arrow, factorThru_arrow]
state_before: case refine'_2
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
𝒢 : Set C
h𝒢 : IsDetecting 𝒢
X : C
P Q : Subobject X
h₁ : P ≤ Q
h₂ : ∀ (G : C), G ∈ 𝒢 → ∀ {f : G ⟶ X}, Factors Q f → Factors P f
G : C
hG : G ∈ 𝒢
f : G ⟶ underlying.obj Q
this : Factors P (f ≫ arrow Q)
g : G ⟶ underlying.obj P
hg : g ≫ ofLE P Q h₁ = f
⊢ g = factorThru P (f ≫ arrow Q) this
Theorem: Filter.iInf_sets_eq
File: Mathlib/Order/Filter/Basic.lean

tactic: simp only [mem_iUnion, exists_imp]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.94306
ι : Sort x
f✝ g : Filter α
s t : Set α
f : ι → Filter α
h : Directed (fun x x_1 => x ≥ x_1) f
ne : Nonempty ι
i : ι
⊢ ∀ {x y : Set α}, (x ∈ ⋃ (i : ι), (f i).sets) → x ⊆ y → y ∈ ⋃ (i : ι), (f i).sets

tactic: exact fun i hx hxy => ⟨i, mem_of_superset hx hxy⟩
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.94306
ι : Sort x
f✝ g : Filter α
s t : Set α
f : ι → Filter α
h : Directed (fun x x_1 => x ≥ x_1) f
ne : Nonempty ι
i : ι
⊢ ∀ {x y : Set α} (x_1 : ι), x ∈ (f x_1).sets → x ⊆ y → ∃ i, y ∈ (f i).sets

tactic: simp only [mem_iUnion, exists_imp]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.94306
ι : Sort x
f✝ g : Filter α
s t : Set α
f : ι → Filter α
h : Directed (fun x x_1 => x ≥ x_1) f
ne : Nonempty ι
i : ι
⊢ ∀ {x y : Set α}, (x ∈ ⋃ (i : ι), (f i).sets) → (y ∈ ⋃ (i : ι), (f i).sets) → x ∩ y ∈ ⋃ (i : ι), (f i).sets

tactic: intro x y a hx b hy
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.94306
ι : Sort x
f✝ g : Filter α
s t : Set α
f : ι → Filter α
h : Directed (fun x x_1 => x ≥ x_1) f
ne : Nonempty ι
i : ι
⊢ ∀ {x y : Set α} (x_1 : ι), x ∈ (f x_1).sets → ∀ (x_2 : ι), y ∈ (f x_2).sets → ∃ i, x ∩ y ∈ (f i).sets

tactic: rcases h a b with ⟨c, ha, hb⟩
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.94306
ι : Sort x
f✝ g : Filter α
s t : Set α
f : ι → Filter α
h : Directed (fun x x_1 => x ≥ x_1) f
ne : Nonempty ι
i : ι
x y : Set α
a : ι
hx : x ∈ (f a).sets
b : ι
hy : y ∈ (f b).sets
⊢ ∃ i, x ∩ y ∈ (f i).sets

tactic: exact ⟨c, inter_mem (ha hx) (hb hy)⟩
state_before: case intro.intro
α : Type u
β : Type v
γ : Type w
δ : Type ?u.94306
ι : Sort x
f✝ g : Filter α
s t : Set α
f : ι → Filter α
h : Directed (fun x x_1 => x ≥ x_1) f
ne : Nonempty ι
i : ι
x y : Set α
a : ι
hx : x ∈ (f a).sets
b : ι
hy : y ∈ (f b).sets
c : ι
ha : f a ≥ f c
hb : f b ≥ f c
⊢ ∃ i, x ∩ y ∈ (f i).sets

tactic: simp only
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.94306
ι : Sort x
f✝ g : Filter α
s t : Set α
f : ι → Filter α
h : Directed (fun x x_1 => x ≥ x_1) f
ne : Nonempty ι
i : ι
u : Filter α :=
  { sets := ⋃ (i : ι), (f i).sets, univ_sets := (_ : univ ∈ ⋃ (i : ι), (f i).sets), sets_of_superset := ?m.94704,
    inter_sets := ?m.94705 }
this : u = iInf f
⊢ u.sets = ⋃ (i : ι), (f i).sets
Theorem: Metric.hausdorffDist_self_closure
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: simp [hausdorffDist]
state_before: ι : Sort ?u.86240
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x y : α
Φ : α → β
⊢ hausdorffDist s (closure s) = 0
Theorem: MeasureTheory.tsum_measure_preimage_singleton
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: rw [← Set.biUnion_preimage_singleton, measure_biUnion hs (pairwiseDisjoint_fiber f s) hf]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.18843
δ : Type ?u.18846
ι : Type ?u.18849
R : Type ?u.18852
R' : Type ?u.18855
m : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t : Set α
s : Set β
hs : Set.Countable s
f : α → β
hf : ∀ (y : β), y ∈ s → MeasurableSet (f ⁻¹' {y})
⊢ (∑' (b : ↑s), ↑↑μ (f ⁻¹' {↑b})) = ↑↑μ (f ⁻¹' s)
Theorem: Finset.disjSups_union_left
File: Mathlib/Data/Finset/Sups.lean

tactic: simp [disjSups, filter_union, image_union]
state_before: α : Type u_1
inst✝³ : DecidableEq α
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
⊢ (s₁ ∪ s₂) ○ t = s₁ ○ t ∪ s₂ ○ t
Theorem: spectrum.smul_eq_smul
File: Mathlib/Algebra/Algebra/Spectrum.lean

tactic: rcases eq_or_ne k 0 with (rfl | h)
state_before: 𝕜 : Type u
A : Type v
inst✝³ : Field 𝕜
inst✝² : Ring A
inst✝¹ : Algebra 𝕜 A
inst✝ : Nontrivial A
k : 𝕜
a : A
ha : Set.Nonempty (σ a)
⊢ σ (k • a) = k • σ a

tactic: simpa [ha, zero_smul_set] using (show {(0 : 𝕜)} = (0 : Set 𝕜) from rfl)
state_before: case inl
𝕜 : Type u
A : Type v
inst✝³ : Field 𝕜
inst✝² : Ring A
inst✝¹ : Algebra 𝕜 A
inst✝ : Nontrivial A
a : A
ha : Set.Nonempty (σ a)
⊢ σ (0 • a) = 0 • σ a

tactic: exact unit_smul_eq_smul a (Units.mk0 k h)
state_before: case inr
𝕜 : Type u
A : Type v
inst✝³ : Field 𝕜
inst✝² : Ring A
inst✝¹ : Algebra 𝕜 A
inst✝ : Nontrivial A
k : 𝕜
a : A
ha : Set.Nonempty (σ a)
h : k ≠ 0
⊢ σ (k • a) = k • σ a
Theorem: Pell.xn_ge_a_pow
File: Mathlib/NumberTheory/PellMatiyasevic.lean

tactic: simp [_root_.pow_succ']
state_before: a : ℕ
a1 : 1 < a
n : ℕ
⊢ a ^ (n + 1) ≤ xn a1 (n + 1)

tactic: exact le_trans (Nat.mul_le_mul_right _ (xn_ge_a_pow n)) (Nat.le_add_right _ _)
state_before: a : ℕ
a1 : 1 < a
n : ℕ
⊢ a ^ n * a ≤ xn a1 n * a + Pell.d a1 * yn a1 n
Theorem: Finset.fold_congr
File: Mathlib/Data/Finset/Fold.lean

tactic: rw [fold, fold, map_congr rfl H]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.8657
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
g : α → β
H : ∀ (x : α), x ∈ s → f x = g x
⊢ fold op b f s = fold op b g s
Theorem: Computation.map_comp
File: Mathlib/Data/Seq/Computation.lean

tactic: apply Subtype.eq
state_before: α : Type u
β : Type v
γ : Type w
f : α → β
g : β → γ
s : Stream' (Option α)
al : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, s n = some a → s (n + 1) = some a
⊢ map (g ∘ f) { val := s, property := al } = map g (map f { val := s, property := al })

tactic: dsimp [map]
state_before: case a
α : Type u
β : Type v
γ : Type w
f : α → β
g : β → γ
s : Stream' (Option α)
al : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, s n = some a → s (n + 1) = some a
⊢ ↑(map (g ∘ f) { val := s, property := al }) = ↑(map g (map f { val := s, property := al }))

tactic: apply congr_arg fun f : _ → Option γ => Stream'.map f s
state_before: case a
α : Type u
β : Type v
γ : Type w
f : α → β
g : β → γ
s : Stream' (Option α)
al : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, s n = some a → s (n + 1) = some a
⊢ Stream'.map (fun o => Option.rec none (fun val => some (g (f val))) o) s =
    Stream'.map
      ((fun o => Option.rec none (fun val => some (g val)) o) ∘ fun o => Option.rec none (fun val => some (f val)) o) s

tactic: ext ⟨⟩ <;> rfl
state_before: case a
α : Type u
β : Type v
γ : Type w
f : α → β
g : β → γ
s : Stream' (Option α)
al : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, s n = some a → s (n + 1) = some a
⊢ (fun o => Option.rec none (fun val => some (g (f val))) o) =
    (fun o => Option.rec none (fun val => some (g val)) o) ∘ fun o => Option.rec none (fun val => some (f val)) o
Theorem: continuous_iSup_dom
File: Mathlib/Topology/Order.lean

tactic: simp only [continuous_iff_le_induced, iSup_le_iff]
state_before: α : Type u
β : Type v
γ : Type ?u.39838
f : α → β
ι : Sort u_1
t₁ : ι → TopologicalSpace α
t₂ : TopologicalSpace β
⊢ Continuous f ↔ ∀ (i : ι), Continuous f
Theorem: MeasureTheory.IsFundamentalDomain.measure_eq_card_smul_of_smul_ae_eq_self
File: Mathlib/MeasureTheory/Group/FundamentalDomain.lean

tactic: haveI : Fintype G := Fintype.ofFinite G
state_before: G : Type u_1
H : Type ?u.251442
α : Type u_2
β : Type ?u.251448
E : Type ?u.251451
inst✝¹¹ : Group G
inst✝¹⁰ : Group H
inst✝⁹ : MulAction G α
inst✝⁸ : MeasurableSpace α
inst✝⁷ : MulAction H β
inst✝⁶ : MeasurableSpace β
inst✝⁵ : NormedAddCommGroup E
s t✝ : Set α
μ : Measure α
inst✝⁴ : MeasurableSpace G
inst✝³ : MeasurableSMul G α
inst✝² : SMulInvariantMeasure G α μ
inst✝¹ : Countable G
ν : Measure α
inst✝ : Finite G
h : IsFundamentalDomain G s
t : Set α
ht : ∀ (g : G), g • t =ᶠ[ae μ] t
⊢ ↑↑μ t = Nat.card G • ↑↑μ (t ∩ s)

tactic: rw [h.measure_eq_tsum]
state_before: G : Type u_1
H : Type ?u.251442
α : Type u_2
β : Type ?u.251448
E : Type ?u.251451
inst✝¹¹ : Group G
inst✝¹⁰ : Group H
inst✝⁹ : MulAction G α
inst✝⁸ : MeasurableSpace α
inst✝⁷ : MulAction H β
inst✝⁶ : MeasurableSpace β
inst✝⁵ : NormedAddCommGroup E
s t✝ : Set α
μ : Measure α
inst✝⁴ : MeasurableSpace G
inst✝³ : MeasurableSMul G α
inst✝² : SMulInvariantMeasure G α μ
inst✝¹ : Countable G
ν : Measure α
inst✝ : Finite G
h : IsFundamentalDomain G s
t : Set α
ht : ∀ (g : G), g • t =ᶠ[ae μ] t
this : Fintype G
⊢ ↑↑μ t = Nat.card G • ↑↑μ (t ∩ s)

tactic: replace ht : ∀ g : G, (g • t ∩ s : Set α) =ᵐ[μ] (t ∩ s : Set α) := fun g =>
  ae_eq_set_inter (ht g) (ae_eq_refl s)
state_before: G : Type u_1
H : Type ?u.251442
α : Type u_2
β : Type ?u.251448
E : Type ?u.251451
inst✝¹¹ : Group G
inst✝¹⁰ : Group H
inst✝⁹ : MulAction G α
inst✝⁸ : MeasurableSpace α
inst✝⁷ : MulAction H β
inst✝⁶ : MeasurableSpace β
inst✝⁵ : NormedAddCommGroup E
s t✝ : Set α
μ : Measure α
inst✝⁴ : MeasurableSpace G
inst✝³ : MeasurableSMul G α
inst✝² : SMulInvariantMeasure G α μ
inst✝¹ : Countable G
ν : Measure α
inst✝ : Finite G
h : IsFundamentalDomain G s
t : Set α
ht : ∀ (g : G), g • t =ᶠ[ae μ] t
this : Fintype G
⊢ (∑' (g : G), ↑↑μ (g • t ∩ s)) = Nat.card G • ↑↑μ (t ∩ s)

tactic: simp_rw [measure_congr (ht _), tsum_fintype, Finset.sum_const, Nat.card_eq_fintype_card,
  Finset.card_univ]
state_before: G : Type u_1
H : Type ?u.251442
α : Type u_2
β : Type ?u.251448
E : Type ?u.251451
inst✝¹¹ : Group G
inst✝¹⁰ : Group H
inst✝⁹ : MulAction G α
inst✝⁸ : MeasurableSpace α
inst✝⁷ : MulAction H β
inst✝⁶ : MeasurableSpace β
inst✝⁵ : NormedAddCommGroup E
s t✝ : Set α
μ : Measure α
inst✝⁴ : MeasurableSpace G
inst✝³ : MeasurableSMul G α
inst✝² : SMulInvariantMeasure G α μ
inst✝¹ : Countable G
ν : Measure α
inst✝ : Finite G
h : IsFundamentalDomain G s
t : Set α
this : Fintype G
ht : ∀ (g : G), g • t ∩ s =ᶠ[ae μ] t ∩ s
⊢ (∑' (g : G), ↑↑μ (g • t ∩ s)) = Nat.card G • ↑↑μ (t ∩ s)
Theorem: derived_le_lower_central
File: Mathlib/GroupTheory/Nilpotent.lean

tactic: induction' n with i ih
state_before: G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
n : ℕ
⊢ derivedSeries G n ≤ lowerCentralSeries G n

tactic: simp
state_before: case zero
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
⊢ derivedSeries G Nat.zero ≤ lowerCentralSeries G Nat.zero

tactic: apply commutator_mono ih
state_before: case succ
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
i : ℕ
ih : derivedSeries G i ≤ lowerCentralSeries G i
⊢ derivedSeries G (Nat.succ i) ≤ lowerCentralSeries G (Nat.succ i)

tactic: simp
state_before: case succ
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
i : ℕ
ih : derivedSeries G i ≤ lowerCentralSeries G i
⊢ derivedSeries G i ≤ ⊤
Theorem: Basis.equivFun_self
File: Mathlib/LinearAlgebra/Basis.lean

tactic: rw [b.equivFun_apply, b.repr_self_apply]
state_before: ι : Type u_1
ι' : Type ?u.670971
R : Type u_2
R₂ : Type ?u.670977
K : Type ?u.670980
M : Type u_3
M' : Type ?u.670986
M'' : Type ?u.670989
V : Type u
V' : Type ?u.670994
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid M'
inst✝² : Module R M'
inst✝¹ : Fintype ι
b : Basis ι R M
inst✝ : DecidableEq ι
i j : ι
⊢ ↑(equivFun b) (↑b i) j = if i = j then 1 else 0
Theorem: Polynomial.reflect_C_mul_X_pow
File: Mathlib/Data/Polynomial/Reverse.lean

tactic: ext
state_before: R : Type u_1
inst✝ : Semiring R
f : R[X]
N n : ℕ
c : R
⊢ reflect N (↑C c * X ^ n) = ↑C c * X ^ ↑(revAt N) n

tactic: rw [reflect_C_mul, coeff_C_mul, coeff_C_mul, coeff_X_pow, coeff_reflect]
state_before: case a
R : Type u_1
inst✝ : Semiring R
f : R[X]
N n : ℕ
c : R
n✝ : ℕ
⊢ coeff (reflect N (↑C c * X ^ n)) n✝ = coeff (↑C c * X ^ ↑(revAt N) n) n✝

tactic: split_ifs with h
state_before: case a
R : Type u_1
inst✝ : Semiring R
f : R[X]
N n : ℕ
c : R
n✝ : ℕ
⊢ c * coeff (X ^ n) (↑(revAt N) n✝) = c * if n✝ = ↑(revAt N) n then 1 else 0

tactic: rw [h, revAt_invol, coeff_X_pow_self]
state_before: case a.inl
R : Type u_1
inst✝ : Semiring R
f : R[X]
N n : ℕ
c : R
n✝ : ℕ
h : n✝ = ↑(revAt N) n
⊢ c * coeff (X ^ n) (↑(revAt N) n✝) = c * 1

tactic: rw [not_mem_support_iff.mp]
state_before: case a.inr
R : Type u_1
inst✝ : Semiring R
f : R[X]
N n : ℕ
c : R
n✝ : ℕ
h : ¬n✝ = ↑(revAt N) n
⊢ c * coeff (X ^ n) (↑(revAt N) n✝) = c * 0

tactic: intro a
state_before: case a.inr
R : Type u_1
inst✝ : Semiring R
f : R[X]
N n : ℕ
c : R
n✝ : ℕ
h : ¬n✝ = ↑(revAt N) n
⊢ ¬↑(revAt N) n✝ ∈ support (X ^ n)

tactic: rw [← one_mul (X ^ n), ← C_1] at a
state_before: case a.inr
R : Type u_1
inst✝ : Semiring R
f : R[X]
N n : ℕ
c : R
n✝ : ℕ
h : ¬n✝ = ↑(revAt N) n
a : ↑(revAt N) n✝ ∈ support (X ^ n)
⊢ False

tactic: apply h
state_before: case a.inr
R : Type u_1
inst✝ : Semiring R
f : R[X]
N n : ℕ
c : R
n✝ : ℕ
h : ¬n✝ = ↑(revAt N) n
a : ↑(revAt N) n✝ ∈ support (↑C 1 * X ^ n)
⊢ False

tactic: rw [← mem_support_C_mul_X_pow a, revAt_invol]
state_before: case a.inr
R : Type u_1
inst✝ : Semiring R
f : R[X]
N n : ℕ
c : R
n✝ : ℕ
h : ¬n✝ = ↑(revAt N) n
a : ↑(revAt N) n✝ ∈ support (↑C 1 * X ^ n)
⊢ n✝ = ↑(revAt N) n
Theorem: Int.ModEq.of_div
File: Mathlib/Data/Int/ModEq.lean

tactic: convert h.mul_left' <;> rwa [Int.mul_ediv_cancel']
state_before: m n a b c d : ℤ
h : a / c ≡ b / c [ZMOD m / c]
ha✝¹ : c ∣ a
ha✝ : c ∣ b
ha : c ∣ m
⊢ a ≡ b [ZMOD m]
Theorem: factorization_eq_count
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: simp [factorization]
state_before: α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : UniqueFactorizationMonoid α
inst✝¹ : NormalizationMonoid α
inst✝ : DecidableEq α
n p : α
⊢ ↑(factorization n) p = Multiset.count p (normalizedFactors n)
Theorem: Functor.Comp.id_map
File: Mathlib/Control/Functor.lean

tactic: simp [Comp.map, Functor.map_id]
state_before: F : Type u → Type w
G : Type v → Type u
inst✝³ : Functor F
inst✝² : Functor G
inst✝¹ : LawfulFunctor F
inst✝ : LawfulFunctor G
α β γ : Type v
x : F (G α)
⊢ Comp.map id (mk x) = mk x

tactic: rfl
state_before: F : Type u → Type w
G : Type v → Type u
inst✝³ : Functor F
inst✝² : Functor G
inst✝¹ : LawfulFunctor F
inst✝ : LawfulFunctor G
α β γ : Type v
x : F (G α)
⊢ mk (mk x) = mk x
Theorem: sdiff_sdiff
File: Mathlib/Order/Heyting/Basic.lean

tactic: simp_rw [sdiff_le_iff, sup_assoc]
state_before: ι : Type ?u.134830
α : Type u_1
β : Type ?u.134836
inst✝ : GeneralizedCoheytingAlgebra α
a✝ b✝ c✝ d✝ a b c d : α
⊢ (a \ b) \ c ≤ d ↔ a \ (b ⊔ c) ≤ d
Theorem: Basis.orientation_neg_single
File: Mathlib/LinearAlgebra/Orientation.lean

tactic: rw [orientation_unitsSMul, Finset.prod_update_of_mem (Finset.mem_univ _)]
state_before: R : Type u_1
inst✝⁵ : LinearOrderedCommRing R
M : Type u_3
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
ι : Type u_2
inst✝² : Fintype ι
inst✝¹ : DecidableEq ι
inst✝ : Nontrivial R
e : Basis ι R M
i : ι
⊢ Basis.orientation (unitsSMul e (Function.update 1 i (-1))) = -Basis.orientation e

tactic: simp
state_before: R : Type u_1
inst✝⁵ : LinearOrderedCommRing R
M : Type u_3
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
ι : Type u_2
inst✝² : Fintype ι
inst✝¹ : DecidableEq ι
inst✝ : Nontrivial R
e : Basis ι R M
i : ι
⊢ (-1 * ∏ x in Finset.univ \ {i}, OfNat.ofNat 1 x)⁻¹ • Basis.orientation e = -Basis.orientation e
Theorem: Int.neg_lt_neg
File: Std/Data/Int/Lemmas.lean

tactic: have : 0 < -a + b := Int.add_left_neg a ▸ Int.add_lt_add_left h (-a)
state_before: a b : Int
h : a < b
⊢ -b < -a

tactic: have : 0 + -b < -a + b + -b := Int.add_lt_add_right this (-b)
state_before: a b : Int
h : a < b
this : 0 < -a + b
⊢ -b < -a

tactic: rwa [Int.add_neg_cancel_right, Int.zero_add] at this
state_before: a b : Int
h : a < b
this✝ : 0 < -a + b
this : 0 + -b < -a + b + -b
⊢ -b < -a