tasksource/leandojo huggingface dataset:
Theorem: Complex.cpow_nat_inv_pow
File: Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean

tactic: suffices im (log x * (n⁻¹ : ℂ)) ∈ Ioc (-π) π by
  rw [← cpow_nat_cast, ← cpow_mul _ this.1 this.2, inv_mul_cancel, cpow_one]
  exact_mod_cast hn
state_before: x : ℂ
n : ℕ
hn : n ≠ 0
⊢ (x ^ (↑n)⁻¹) ^ n = x

tactic: rw [mul_comm, ← ofReal_nat_cast, ← ofReal_inv, ofReal_mul_im, ← div_eq_inv_mul]
state_before: x : ℂ
n : ℕ
hn : n ≠ 0
⊢ (log x * (↑n)⁻¹).im ∈ Set.Ioc (-π) π

tactic: rw [← pos_iff_ne_zero] at hn
state_before: x : ℂ
n : ℕ
hn : n ≠ 0
⊢ (log x).im / ↑n ∈ Set.Ioc (-π) π

tactic: have hn' : 0 < (n : ℝ) := by assumption_mod_cast
state_before: x : ℂ
n : ℕ
hn : 0 < n
⊢ (log x).im / ↑n ∈ Set.Ioc (-π) π

tactic: have hn1 : 1 ≤ (n : ℝ) := by exact_mod_cast Nat.succ_le_iff.2 hn
state_before: x : ℂ
n : ℕ
hn : 0 < n
hn' : 0 < ↑n
⊢ (log x).im / ↑n ∈ Set.Ioc (-π) π

tactic: constructor
state_before: x : ℂ
n : ℕ
hn : 0 < n
hn' : 0 < ↑n
hn1 : 1 ≤ ↑n
⊢ (log x).im / ↑n ∈ Set.Ioc (-π) π

tactic: rw [← cpow_nat_cast, ← cpow_mul _ this.1 this.2, inv_mul_cancel, cpow_one]
state_before: x : ℂ
n : ℕ
hn : n ≠ 0
this : (log x * (↑n)⁻¹).im ∈ Set.Ioc (-π) π
⊢ (x ^ (↑n)⁻¹) ^ n = x

tactic: exact_mod_cast hn
state_before: x : ℂ
n : ℕ
hn : n ≠ 0
this : (log x * (↑n)⁻¹).im ∈ Set.Ioc (-π) π
⊢ ↑n ≠ 0

tactic: assumption_mod_cast
state_before: x : ℂ
n : ℕ
hn : 0 < n
⊢ 0 < ↑n

tactic: exact_mod_cast Nat.succ_le_iff.2 hn
state_before: x : ℂ
n : ℕ
hn : 0 < n
hn' : 0 < ↑n
⊢ 1 ≤ ↑n

tactic: rw [lt_div_iff hn']
state_before: case left
x : ℂ
n : ℕ
hn : 0 < n
hn' : 0 < ↑n
hn1 : 1 ≤ ↑n
⊢ -π < (log x).im / ↑n

tactic: calc
  -π * n ≤ -π * 1 := mul_le_mul_of_nonpos_left hn1 (neg_nonpos.2 Real.pi_pos.le)
  _ = -π := (mul_one _)
  _ < im (log x) := neg_pi_lt_log_im _
state_before: case left
x : ℂ
n : ℕ
hn : 0 < n
hn' : 0 < ↑n
hn1 : 1 ≤ ↑n
⊢ -π * ↑n < (log x).im

tactic: rw [div_le_iff hn']
state_before: case right
x : ℂ
n : ℕ
hn : 0 < n
hn' : 0 < ↑n
hn1 : 1 ≤ ↑n
⊢ (log x).im / ↑n ≤ π

tactic: calc
  im (log x) ≤ π := log_im_le_pi _
  _ = π * 1 := (mul_one π).symm
  _ ≤ π * n := mul_le_mul_of_nonneg_left hn1 Real.pi_pos.le
state_before: case right
x : ℂ
n : ℕ
hn : 0 < n
hn' : 0 < ↑n
hn1 : 1 ≤ ↑n
⊢ (log x).im ≤ π * ↑n
Theorem: MeasureTheory.Measure.add_haar_ball
File: Mathlib/MeasureTheory/Measure/Lebesgue/EqHaar.lean

tactic: rw [← add_haar_ball_mul μ x hr, mul_one]
state_before: E : Type u_1
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace ℝ E
inst✝⁷ : MeasurableSpace E
inst✝⁶ : BorelSpace E
inst✝⁵ : FiniteDimensional ℝ E
μ : Measure E
inst✝⁴ : IsAddHaarMeasure μ
F : Type ?u.1985564
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace ℝ F
inst✝¹ : CompleteSpace F
s : Set E
inst✝ : Nontrivial E
x : E
r : ℝ
hr : 0 ≤ r
⊢ ↑↑μ (ball x r) = ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (ball 0 1)
Theorem: Algebra.smul_leftMulMatrix_algebraMap_ne
File: Mathlib/LinearAlgebra/Matrix/ToLin.lean

tactic: rw [smul_leftMulMatrix_algebraMap, blockDiagonal_apply_ne _ _ _ h]
state_before: R : Type u_2
S : Type u_5
T : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Ring T
inst✝⁷ : Algebra R S
inst✝⁶ : Algebra S T
inst✝⁵ : Algebra R T
inst✝⁴ : IsScalarTower R S T
m : Type u_4
n : Type u_1
inst✝³ : Fintype m
inst✝² : Fintype n
inst✝¹ : DecidableEq m
inst✝ : DecidableEq n
b : Basis m R S
c : Basis n S T
x : S
i j : m
k k' : n
h : k ≠ k'
⊢ ↑(leftMulMatrix (Basis.smul b c)) (↑(algebraMap S T) x) (i, k) (j, k') = 0
Theorem: isExtreme_iInter
File: Mathlib/Analysis/Convex/Extreme.lean

tactic: obtain i := Classical.arbitrary ι
state_before: 𝕜 : Type u_3
E : Type u_2
F✝ : Type ?u.2902
ι✝ : Type ?u.2905
π : ι✝ → Type ?u.2910
inst✝³ : OrderedSemiring 𝕜
inst✝² : AddCommMonoid E
inst✝¹ : SMul 𝕜 E
A B C : Set E
x : E
ι : Sort u_1
inst✝ : Nonempty ι
F : ι → Set E
hAF : ∀ (i : ι), IsExtreme 𝕜 A (F i)
⊢ IsExtreme 𝕜 A (⋂ (i : ι), F i)

tactic: refine' ⟨iInter_subset_of_subset i (hAF i).1, fun x₁ hx₁A x₂ hx₂A x hxF hx ↦ _⟩
state_before: 𝕜 : Type u_3
E : Type u_2
F✝ : Type ?u.2902
ι✝ : Type ?u.2905
π : ι✝ → Type ?u.2910
inst✝³ : OrderedSemiring 𝕜
inst✝² : AddCommMonoid E
inst✝¹ : SMul 𝕜 E
A B C : Set E
x : E
ι : Sort u_1
inst✝ : Nonempty ι
F : ι → Set E
hAF : ∀ (i : ι), IsExtreme 𝕜 A (F i)
i : ι
⊢ IsExtreme 𝕜 A (⋂ (i : ι), F i)

tactic: simp_rw [mem_iInter] at hxF⊢
state_before: 𝕜 : Type u_3
E : Type u_2
F✝ : Type ?u.2902
ι✝ : Type ?u.2905
π : ι✝ → Type ?u.2910
inst✝³ : OrderedSemiring 𝕜
inst✝² : AddCommMonoid E
inst✝¹ : SMul 𝕜 E
A B C : Set E
x✝ : E
ι : Sort u_1
inst✝ : Nonempty ι
F : ι → Set E
hAF : ∀ (i : ι), IsExtreme 𝕜 A (F i)
i : ι
x₁ : E
hx₁A : x₁ ∈ A
x₂ : E
hx₂A : x₂ ∈ A
x : E
hxF : x ∈ ⋂ (i : ι), F i
hx : x ∈ openSegment 𝕜 x₁ x₂
⊢ (x₁ ∈ ⋂ (i : ι), F i) ∧ x₂ ∈ ⋂ (i : ι), F i

tactic: have h := fun i ↦ (hAF i).2 hx₁A hx₂A (hxF i) hx
state_before: 𝕜 : Type u_3
E : Type u_2
F✝ : Type ?u.2902
ι✝ : Type ?u.2905
π : ι✝ → Type ?u.2910
inst✝³ : OrderedSemiring 𝕜
inst✝² : AddCommMonoid E
inst✝¹ : SMul 𝕜 E
A B C : Set E
x✝ : E
ι : Sort u_1
inst✝ : Nonempty ι
F : ι → Set E
hAF : ∀ (i : ι), IsExtreme 𝕜 A (F i)
i : ι
x₁ : E
hx₁A : x₁ ∈ A
x₂ : E
hx₂A : x₂ ∈ A
x : E
hx : x ∈ openSegment 𝕜 x₁ x₂
hxF : ∀ (i : ι), x ∈ F i
⊢ (∀ (i : ι), x₁ ∈ F i) ∧ ∀ (i : ι), x₂ ∈ F i

tactic: exact ⟨fun i ↦ (h i).1, fun i ↦ (h i).2⟩
state_before: 𝕜 : Type u_3
E : Type u_2
F✝ : Type ?u.2902
ι✝ : Type ?u.2905
π : ι✝ → Type ?u.2910
inst✝³ : OrderedSemiring 𝕜
inst✝² : AddCommMonoid E
inst✝¹ : SMul 𝕜 E
A B C : Set E
x✝ : E
ι : Sort u_1
inst✝ : Nonempty ι
F : ι → Set E
hAF : ∀ (i : ι), IsExtreme 𝕜 A (F i)
i : ι
x₁ : E
hx₁A : x₁ ∈ A
x₂ : E
hx₂A : x₂ ∈ A
x : E
hx : x ∈ openSegment 𝕜 x₁ x₂
hxF : ∀ (i : ι), x ∈ F i
h : ∀ (i : ι), x₁ ∈ F i ∧ x₂ ∈ F i
⊢ (∀ (i : ι), x₁ ∈ F i) ∧ ∀ (i : ι), x₂ ∈ F i
Theorem: Cardinal.power_self_eq
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: apply ((power_le_power_right <| (cantor c).le).trans _).antisymm
state_before: c : Cardinal
h : ℵ₀ ≤ c
⊢ c ^ c = 2 ^ c

tactic: exact power_le_power_right ((nat_lt_aleph0 2).le.trans h)
state_before: c : Cardinal
h : ℵ₀ ≤ c
⊢ 2 ^ c ≤ c ^ c

tactic: rw [← power_mul, mul_eq_self h]
state_before: c : Cardinal
h : ℵ₀ ≤ c
⊢ (2 ^ c) ^ c ≤ 2 ^ c
Theorem: Nat.prod_pow_pos_of_zero_not_mem_support
File: Mathlib/Algebra/BigOperators/Finsupp.lean

tactic: subst H
state_before: α : Type ?u.637459
ι : Type ?u.637462
γ : Type ?u.637465
A : Type ?u.637468
B : Type ?u.637471
C : Type ?u.637474
inst✝² : AddCommMonoid A
inst✝¹ : AddCommMonoid B
inst✝ : AddCommMonoid C
t : ι → A → C
h0 : ∀ (i : ι), t i 0 = 0
h1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y
s : Finset α
f✝ : α → ι →₀ A
i : ι
g : ι →₀ A
k : ι → A → γ → B
x : γ
β : Type ?u.640604
M : Type ?u.640607
M' : Type ?u.640610
N : Type ?u.640613
P : Type ?u.640616
G : Type ?u.640619
H✝ : Type ?u.640622
R : Type ?u.640625
S : Type ?u.640628
f : ℕ →₀ ℕ
hf : ¬0 ∈ f.support
a : ℕ
ha : a ∈ f.support
H : a = 0
⊢ False

tactic: exact hf ha
state_before: α : Type ?u.637459
ι : Type ?u.637462
γ : Type ?u.637465
A : Type ?u.637468
B : Type ?u.637471
C : Type ?u.637474
inst✝² : AddCommMonoid A
inst✝¹ : AddCommMonoid B
inst✝ : AddCommMonoid C
t : ι → A → C
h0 : ∀ (i : ι), t i 0 = 0
h1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y
s : Finset α
f✝ : α → ι →₀ A
i : ι
g : ι →₀ A
k : ι → A → γ → B
x : γ
β : Type ?u.640604
M : Type ?u.640607
M' : Type ?u.640610
N : Type ?u.640613
P : Type ?u.640616
G : Type ?u.640619
H : Type ?u.640622
R : Type ?u.640625
S : Type ?u.640628
f : ℕ →₀ ℕ
hf : ¬0 ∈ f.support
ha : 0 ∈ f.support
⊢ False
Theorem: lp.uniformContinuous_coe
File: Mathlib/Analysis/NormedSpace/lpSpace.lean

tactic: have hp : p ≠ 0 := (zero_lt_one.trans_le _i.elim).ne'
state_before: α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
_i : Fact (1 ≤ p)
⊢ UniformContinuous Subtype.val

tactic: rw [uniformContinuous_pi]
state_before: α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
_i : Fact (1 ≤ p)
hp : p ≠ 0
⊢ UniformContinuous Subtype.val

tactic: intro i
state_before: α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
_i : Fact (1 ≤ p)
hp : p ≠ 0
⊢ ∀ (i : α), UniformContinuous fun x => ↑x i

tactic: rw [NormedAddCommGroup.uniformity_basis_dist.uniformContinuous_iff
  NormedAddCommGroup.uniformity_basis_dist]
state_before: α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
_i : Fact (1 ≤ p)
hp : p ≠ 0
i : α
⊢ UniformContinuous fun x => ↑x i

tactic: intro ε hε
state_before: α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
_i : Fact (1 ≤ p)
hp : p ≠ 0
i : α
⊢ ∀ (i_1 : ℝ),
    0 < i_1 →
      ∃ j,
        0 < j ∧
          ∀ (x y : { x // x ∈ lp E p }),
            (x, y) ∈ {p_1 | ‖p_1.fst - p_1.snd‖ < j} → (↑x i, ↑y i) ∈ {p | ‖p.fst - p.snd‖ < i_1}

tactic: refine' ⟨ε, hε, _⟩
state_before: α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
_i : Fact (1 ≤ p)
hp : p ≠ 0
i : α
ε : ℝ
hε : 0 < ε
⊢ ∃ j,
    0 < j ∧
      ∀ (x y : { x // x ∈ lp E p }), (x, y) ∈ {p_1 | ‖p_1.fst - p_1.snd‖ < j} → (↑x i, ↑y i) ∈ {p | ‖p.fst - p.snd‖ < ε}

tactic: rintro f g (hfg : ‖f - g‖ < ε)
state_before: α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
_i : Fact (1 ≤ p)
hp : p ≠ 0
i : α
ε : ℝ
hε : 0 < ε
⊢ ∀ (x y : { x // x ∈ lp E p }), (x, y) ∈ {p_1 | ‖p_1.fst - p_1.snd‖ < ε} → (↑x i, ↑y i) ∈ {p | ‖p.fst - p.snd‖ < ε}

tactic: have : ‖f i - g i‖ ≤ ‖f - g‖ := norm_apply_le_norm hp (f - g) i
state_before: α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
_i : Fact (1 ≤ p)
hp : p ≠ 0
i : α
ε : ℝ
hε : 0 < ε
f g : { x // x ∈ lp E p }
hfg : ‖f - g‖ < ε
⊢ (↑f i, ↑g i) ∈ {p | ‖p.fst - p.snd‖ < ε}

tactic: exact this.trans_lt hfg
state_before: α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
_i : Fact (1 ≤ p)
hp : p ≠ 0
i : α
ε : ℝ
hε : 0 < ε
f g : { x // x ∈ lp E p }
hfg : ‖f - g‖ < ε
this : ‖↑f i - ↑g i‖ ≤ ‖f - g‖
⊢ (↑f i, ↑g i) ∈ {p | ‖p.fst - p.snd‖ < ε}
Theorem: Prod.gameAdd_iff
File: Mathlib/Order/GameAdd.lean

tactic: constructor
state_before: α : Type u_1
β : Type u_2
rα✝ : α → α → Prop
rβ✝ : β → β → Prop
rα : α → α → Prop
rβ : β → β → Prop
x y : α × β
⊢ GameAdd rα rβ x y ↔ rα x.fst y.fst ∧ x.snd = y.snd ∨ rβ x.snd y.snd ∧ x.fst = y.fst

tactic: rintro (@⟨a₁, a₂, b, h⟩ | @⟨a, b₁, b₂, h⟩)
state_before: case mp
α : Type u_1
β : Type u_2
rα✝ : α → α → Prop
rβ✝ : β → β → Prop
rα : α → α → Prop
rβ : β → β → Prop
x y : α × β
⊢ GameAdd rα rβ x y → rα x.fst y.fst ∧ x.snd = y.snd ∨ rβ x.snd y.snd ∧ x.fst = y.fst

tactic: exacts [Or.inl ⟨h, rfl⟩, Or.inr ⟨h, rfl⟩]
state_before: case mp.fst
α : Type u_1
β : Type u_2
rα✝ : α → α → Prop
rβ✝ : β → β → Prop
rα : α → α → Prop
rβ : β → β → Prop
a₁ a₂ : α
b : β
h : rα a₁ a₂
⊢ rα (a₁, b).fst (a₂, b).fst ∧ (a₁, b).snd = (a₂, b).snd ∨ rβ (a₁, b).snd (a₂, b).snd ∧ (a₁, b).fst = (a₂, b).fst

case mp.snd
α : Type u_1
β : Type u_2
rα✝ : α → α → Prop
rβ✝ : β → β → Prop
rα : α → α → Prop
rβ : β → β → Prop
a : α
b₁ b₂ : β
h : rβ b₁ b₂
⊢ rα (a, b₁).fst (a, b₂).fst ∧ (a, b₁).snd = (a, b₂).snd ∨ rβ (a, b₁).snd (a, b₂).snd ∧ (a, b₁).fst = (a, b₂).fst

tactic: revert x y
state_before: case mpr
α : Type u_1
β : Type u_2
rα✝ : α → α → Prop
rβ✝ : β → β → Prop
rα : α → α → Prop
rβ : β → β → Prop
x y : α × β
⊢ rα x.fst y.fst ∧ x.snd = y.snd ∨ rβ x.snd y.snd ∧ x.fst = y.fst → GameAdd rα rβ x y

tactic: rintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩ (⟨h, rfl : b₁ = b₂⟩ | ⟨h, rfl : a₁ = a₂⟩)
state_before: case mpr
α : Type u_1
β : Type u_2
rα✝ : α → α → Prop
rβ✝ : β → β → Prop
rα : α → α → Prop
rβ : β → β → Prop
⊢ ∀ {x y : α × β}, rα x.fst y.fst ∧ x.snd = y.snd ∨ rβ x.snd y.snd ∧ x.fst = y.fst → GameAdd rα rβ x y

tactic: exacts [GameAdd.fst h, GameAdd.snd h]
state_before: case mpr.mk.mk.inl.intro
α : Type u_1
β : Type u_2
rα✝ : α → α → Prop
rβ✝ : β → β → Prop
rα : α → α → Prop
rβ : β → β → Prop
a₁ : α
b₁ : β
a₂ : α
h : rα (a₁, b₁).fst (a₂, b₁).fst
⊢ GameAdd rα rβ (a₁, b₁) (a₂, b₁)

case mpr.mk.mk.inr.intro
α : Type u_1
β : Type u_2
rα✝ : α → α → Prop
rβ✝ : β → β → Prop
rα : α → α → Prop
rβ : β → β → Prop
a₁ : α
b₁ b₂ : β
h : rβ (a₁, b₁).snd (a₁, b₂).snd
⊢ GameAdd rα rβ (a₁, b₁) (a₁, b₂)
Theorem: Ordinal.sup_eq_lsub_iff_lt_sup
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: rw [h]
state_before: α : Type ?u.326038
β : Type ?u.326041
γ : Type ?u.326044
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u
f : ι → Ordinal
h : sup f = lsub f
i : ι
⊢ f i < sup f

tactic: apply lt_lsub
state_before: α : Type ?u.326038
β : Type ?u.326041
γ : Type ?u.326044
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u
f : ι → Ordinal
h : sup f = lsub f
i : ι
⊢ f i < lsub f
Theorem: Stream'.WSeq.liftRel_cons
File: Mathlib/Data/Seq/WSeq.lean

tactic: rw [liftRel_destruct_iff]
state_before: α : Type u
β : Type v
γ : Type w
R : α → β → Prop
a : α
b : β
s : WSeq α
t : WSeq β
⊢ LiftRel R (cons a s) (cons b t) ↔ R a b ∧ LiftRel R s t

tactic: simp [-liftRel_pure_left, -liftRel_pure_right]
state_before: α : Type u
β : Type v
γ : Type w
R : α → β → Prop
a : α
b : β
s : WSeq α
t : WSeq β
⊢ Computation.LiftRel (LiftRelO R (LiftRel R)) (destruct (cons a s)) (destruct (cons b t)) ↔ R a b ∧ LiftRel R s t
Theorem: SatisfiesM_StateT_eq
File: Std/Classes/LawfulMonad.lean

tactic: refine .trans ⟨fun ⟨f, eq⟩ => eq ▸ ?_, fun ⟨f, h⟩ => ?_⟩ Classical.skolem.symm
state_before: m : Type u_1 → Type u_2
α ρ : Type u_1
p : α → Prop
x : StateT ρ m α
inst✝¹ : Monad m
inst✝ : LawfulMonad m
⊢ SatisfiesM p x ↔ ∀ (s : ρ), SatisfiesM (fun x => p x.fst) (x s)

tactic: refine ⟨fun s => (fun ⟨⟨a, h⟩, s'⟩ => ⟨⟨a, s'⟩, h⟩) <$> f s, fun s => ?_⟩
state_before: case refine_1
m : Type u_1 → Type u_2
α ρ : Type u_1
p : α → Prop
x : StateT ρ m α
inst✝¹ : Monad m
inst✝ : LawfulMonad m
x✝ : SatisfiesM p x
f : StateT ρ m { a // p a }
eq : Subtype.val <$> f = x
⊢ ∃ f_1, ∀ (x : ρ), Subtype.val <$> f_1 x = (Subtype.val <$> f) x

tactic: rw [← comp_map, map_eq_pure_bind]
state_before: case refine_1
m : Type u_1 → Type u_2
α ρ : Type u_1
p : α → Prop
x : StateT ρ m α
inst✝¹ : Monad m
inst✝ : LawfulMonad m
x✝ : SatisfiesM p x
f : StateT ρ m { a // p a }
eq : Subtype.val <$> f = x
s : ρ
⊢ Subtype.val <$>
      (fun s =>
          (fun x =>
              match x with
              | ({ val := a, property := h }, s') => { val := (a, s'), property := h }) <$>
            f s)
        s =
    (Subtype.val <$> f) s

tactic: rfl
state_before: case refine_1
m : Type u_1 → Type u_2
α ρ : Type u_1
p : α → Prop
x : StateT ρ m α
inst✝¹ : Monad m
inst✝ : LawfulMonad m
x✝ : SatisfiesM p x
f : StateT ρ m { a // p a }
eq : Subtype.val <$> f = x
s : ρ
⊢ (do
      let a ← f s
      pure
          ((Subtype.val ∘ fun x =>
              match x with
              | ({ val := a, property := h }, s') => { val := (a, s'), property := h })
            a)) =
    (Subtype.val <$> f) s

tactic: refine ⟨fun s => (fun ⟨⟨a, s'⟩, h⟩ => ⟨⟨a, h⟩, s'⟩) <$> f s, funext fun s => ?_⟩
state_before: case refine_2
m : Type u_1 → Type u_2
α ρ : Type u_1
p : α → Prop
x : StateT ρ m α
inst✝¹ : Monad m
inst✝ : LawfulMonad m
x✝ : ∃ f, ∀ (x_1 : ρ), Subtype.val <$> f x_1 = x x_1
f : ρ → m { a // (fun x => p x.fst) a }
h : ∀ (x_1 : ρ), Subtype.val <$> f x_1 = x x_1
⊢ SatisfiesM p x

tactic: show _ >>= _ = _
state_before: case refine_2
m : Type u_1 → Type u_2
α ρ : Type u_1
p : α → Prop
x : StateT ρ m α
inst✝¹ : Monad m
inst✝ : LawfulMonad m
x✝ : ∃ f, ∀ (x_1 : ρ), Subtype.val <$> f x_1 = x x_1
f : ρ → m { a // (fun x => p x.fst) a }
h : ∀ (x_1 : ρ), Subtype.val <$> f x_1 = x x_1
s : ρ
⊢ (Subtype.val <$> fun s =>
        (fun x =>
            match x with
            | { val := (a, s'), property := h } => ({ val := a, property := h }, s')) <$>
          f s)
      s =
    x s

tactic: simp [map_eq_pure_bind, ← h]
state_before: case refine_2
m : Type u_1 → Type u_2
α ρ : Type u_1
p : α → Prop
x : StateT ρ m α
inst✝¹ : Monad m
inst✝ : LawfulMonad m
x✝ : ∃ f, ∀ (x_1 : ρ), Subtype.val <$> f x_1 = x x_1
f : ρ → m { a // (fun x => p x.fst) a }
h : ∀ (x_1 : ρ), Subtype.val <$> f x_1 = x x_1
s : ρ
⊢ (do
      let __discr ←
        (fun s =>
              (fun x =>
                  match x with
                  | { val := (a, s'), property := h } => ({ val := a, property := h }, s')) <$>
                f s)
            s
      match __discr with
        | (a, s) => pure (a.val, s)) =
    x s
Theorem: Std.DList.toList_ofList
File: Mathlib/Data/DList/Basic.lean

tactic: cases l
state_before: α : Type u_1
l : List α
⊢ toList (ofList l) = l

tactic: rfl
state_before: case nil
α : Type u_1
⊢ toList (ofList []) = []

case cons
α : Type u_1
head✝ : α
tail✝ : List α
⊢ toList (ofList (head✝ :: tail✝)) = head✝ :: tail✝

tactic: simp only [DList.toList, DList.ofList, List.cons_append, List.append_nil]
state_before: case cons
α : Type u_1
head✝ : α
tail✝ : List α
⊢ toList (ofList (head✝ :: tail✝)) = head✝ :: tail✝
Theorem: Ring.inverse_pow
File: Mathlib/Algebra/GroupPower/Ring.lean

tactic: rw [pow_zero, pow_zero, Ring.inverse_one]
state_before: R : Type ?u.52055
S : Type ?u.52058
M : Type u_1
inst✝ : MonoidWithZero M
r : M
⊢ inverse r ^ 0 = inverse (r ^ 0)

tactic: rw [pow_succ, pow_succ', Ring.mul_inverse_rev' ((Commute.refl r).pow_left n),
  Ring.inverse_pow r n]
state_before: R : Type ?u.52055
S : Type ?u.52058
M : Type u_1
inst✝ : MonoidWithZero M
r : M
n : ℕ
⊢ inverse r ^ (n + 1) = inverse (r ^ (n + 1))
Theorem: ContinuousLinearEquiv.comp_differentiable_iff
File: Mathlib/Analysis/Calculus/FDeriv/Equiv.lean

tactic: rw [← differentiableOn_univ, ← differentiableOn_univ]
state_before: 𝕜 : Type u_1
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_4
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type u_2
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type ?u.76970
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f✝ f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x : E
s t : Set E
L L₁ L₂ : Filter E
iso : E ≃L[𝕜] F
f : G → E
⊢ Differentiable 𝕜 (↑iso ∘ f) ↔ Differentiable 𝕜 f

tactic: exact iso.comp_differentiableOn_iff
state_before: 𝕜 : Type u_1
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_4
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type u_2
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type ?u.76970
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f✝ f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x : E
s t : Set E
L L₁ L₂ : Filter E
iso : E ≃L[𝕜] F
f : G → E
⊢ DifferentiableOn 𝕜 (↑iso ∘ f) univ ↔ DifferentiableOn 𝕜 f univ
Theorem: Submodule.map_mkQ_eq_top
File: Mathlib/LinearAlgebra/Quotient.lean

tactic: simp only [LinearMap.map_eq_top_iff p.range_mkQ, sup_comm, ker_mkQ]
state_before: R : Type u_2
M : Type u_1
r : R
x y : M
inst✝⁵ : Ring R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
p p' : Submodule R M
R₂ : Type ?u.242912
M₂ : Type ?u.242915
inst✝² : Ring R₂
inst✝¹ : AddCommGroup M₂
inst✝ : Module R₂ M₂
τ₁₂ : R →+* R₂
⊢ map (mkQ p) p' = ⊤ ↔ p ⊔ p' = ⊤
Theorem: CategoryTheory.Adjunction.rightAdjointUniq_hom_counit
File: Mathlib/CategoryTheory/Adjunction/Opposites.lean

tactic: ext
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
G G' : D ⥤ C
adj1 : F ⊣ G
adj2 : F ⊣ G'
⊢ whiskerRight (rightAdjointUniq adj1 adj2).hom F ≫ adj2.counit = adj1.counit

tactic: simp
state_before: case w.h
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
G G' : D ⥤ C
adj1 : F ⊣ G
adj2 : F ⊣ G'
x✝ : D
⊢ (whiskerRight (rightAdjointUniq adj1 adj2).hom F ≫ adj2.counit).app x✝ = adj1.counit.app x✝
Theorem: Ideal.mul_sup_eq_of_coprime_left
File: Mathlib/RingTheory/Ideal/Operations.lean

tactic: rw [sup_comm] at h
state_before: R : Type u
ι : Type ?u.272678
inst✝ : CommSemiring R
I J K L : Ideal R
h : I ⊔ J = ⊤
⊢ I * K ⊔ J = K ⊔ J

tactic: rw [sup_comm, sup_mul_eq_of_coprime_left h, sup_comm]
state_before: R : Type u
ι : Type ?u.272678
inst✝ : CommSemiring R
I J K L : Ideal R
h : J ⊔ I = ⊤
⊢ I * K ⊔ J = K ⊔ J
Theorem: PrimeSpectrum.basicOpen_zero
File: Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean

tactic: simp
state_before: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
⊢ ↑(basicOpen 0) = ↑⊥
Theorem: PiLp.nnnorm_equiv_symm_const'
File: Mathlib/Analysis/NormedSpace/PiLp.lean

tactic: clear x y
state_before: p : ℝ≥0∞
𝕜 : Type ?u.503614
𝕜' : Type ?u.503617
ι : Type u_2
α : ι → Type ?u.503625
β✝ : ι → Type ?u.503630
inst✝¹⁰ : Fintype ι
inst✝⁹ : Fact (1 ≤ p)
inst✝⁸ : NormedField 𝕜
inst✝⁷ : NormedField 𝕜'
inst✝⁶ : (i : ι) → SeminormedAddCommGroup (β✝ i)
inst✝⁵ : (i : ι) → NormedSpace 𝕜 (β✝ i)
c : 𝕜
x y : PiLp p β✝
x' y' : (i : ι) → β✝ i
i : ι
ι' : Type ?u.503826
inst✝⁴ : Fintype ι'
E : Type ?u.503832
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
β : Type u_1
inst✝¹ : SeminormedAddCommGroup β
inst✝ : Nonempty ι
b : β
⊢ ‖↑(PiLp.equiv p fun x => β).symm (Function.const ι b)‖₊ = ↑(Fintype.card ι) ^ ENNReal.toReal (1 / p) * ‖b‖₊

tactic: rcases em <| p = ∞ with (rfl | hp)
state_before: p : ℝ≥0∞
𝕜 : Type ?u.503614
𝕜' : Type ?u.503617
ι : Type u_2
α : ι → Type ?u.503625
β✝ : ι → Type ?u.503630
inst✝¹⁰ : Fintype ι
inst✝⁹ : Fact (1 ≤ p)
inst✝⁸ : NormedField 𝕜
inst✝⁷ : NormedField 𝕜'
inst✝⁶ : (i : ι) → SeminormedAddCommGroup (β✝ i)
inst✝⁵ : (i : ι) → NormedSpace 𝕜 (β✝ i)
c : 𝕜
x' y' : (i : ι) → β✝ i
i : ι
ι' : Type ?u.503826
inst✝⁴ : Fintype ι'
E : Type ?u.503832
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
β : Type u_1
inst✝¹ : SeminormedAddCommGroup β
inst✝ : Nonempty ι
b : β
⊢ ‖↑(PiLp.equiv p fun x => β).symm (Function.const ι b)‖₊ = ↑(Fintype.card ι) ^ ENNReal.toReal (1 / p) * ‖b‖₊

tactic: simp only [equiv_symm_apply, ENNReal.div_top, ENNReal.zero_toReal, NNReal.rpow_zero, one_mul,
  nnnorm_eq_ciSup, Function.const_apply, ciSup_const]
state_before: case inl
𝕜 : Type ?u.503614
𝕜' : Type ?u.503617
ι : Type u_2
α : ι → Type ?u.503625
β✝ : ι → Type ?u.503630
inst✝¹⁰ : Fintype ι
inst✝⁹ : NormedField 𝕜
inst✝⁸ : NormedField 𝕜'
inst✝⁷ : (i : ι) → SeminormedAddCommGroup (β✝ i)
inst✝⁶ : (i : ι) → NormedSpace 𝕜 (β✝ i)
c : 𝕜
x' y' : (i : ι) → β✝ i
i : ι
ι' : Type ?u.503826
inst✝⁵ : Fintype ι'
E : Type ?u.503832
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace 𝕜 E
β : Type u_1
inst✝² : SeminormedAddCommGroup β
inst✝¹ : Nonempty ι
b : β
inst✝ : Fact (1 ≤ ⊤)
⊢ ‖↑(PiLp.equiv ⊤ fun x => β).symm (Function.const ι b)‖₊ = ↑(Fintype.card ι) ^ ENNReal.toReal (1 / ⊤) * ‖b‖₊

tactic: exact nnnorm_equiv_symm_const hp b
state_before: case inr
p : ℝ≥0∞
𝕜 : Type ?u.503614
𝕜' : Type ?u.503617
ι : Type u_2
α : ι → Type ?u.503625
β✝ : ι → Type ?u.503630
inst✝¹⁰ : Fintype ι
inst✝⁹ : Fact (1 ≤ p)
inst✝⁸ : NormedField 𝕜
inst✝⁷ : NormedField 𝕜'
inst✝⁶ : (i : ι) → SeminormedAddCommGroup (β✝ i)
inst✝⁵ : (i : ι) → NormedSpace 𝕜 (β✝ i)
c : 𝕜
x' y' : (i : ι) → β✝ i
i : ι
ι' : Type ?u.503826
inst✝⁴ : Fintype ι'
E : Type ?u.503832
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
β : Type u_1
inst✝¹ : SeminormedAddCommGroup β
inst✝ : Nonempty ι
b : β
hp : ¬p = ⊤
⊢ ‖↑(PiLp.equiv p fun x => β).symm (Function.const ι b)‖₊ = ↑(Fintype.card ι) ^ ENNReal.toReal (1 / p) * ‖b‖₊
Theorem: ContinuousLinearMap.smulRight_one_eq_iff
File: Mathlib/Topology/Algebra/Module/Basic.lean

tactic: simp only [ext_ring_iff, smulRight_apply, one_apply, one_smul]
state_before: R₁ : Type u_1
R₂ : Type ?u.669818
R₃ : Type ?u.669821
inst✝²⁰ : Semiring R₁
inst✝¹⁹ : Semiring R₂
inst✝¹⁸ : Semiring R₃
σ₁₂ : R₁ →+* R₂
σ₂₃ : R₂ →+* R₃
σ₁₃ : R₁ →+* R₃
M₁ : Type ?u.669899
inst✝¹⁷ : TopologicalSpace M₁
inst✝¹⁶ : AddCommMonoid M₁
M'₁ : Type ?u.669908
inst✝¹⁵ : TopologicalSpace M'₁
inst✝¹⁴ : AddCommMonoid M'₁
M₂ : Type u_2
inst✝¹³ : TopologicalSpace M₂
inst✝¹² : AddCommMonoid M₂
M₃ : Type ?u.669926
inst✝¹¹ : TopologicalSpace M₃
inst✝¹⁰ : AddCommMonoid M₃
M₄ : Type ?u.669935
inst✝⁹ : TopologicalSpace M₄
inst✝⁸ : AddCommMonoid M₄
inst✝⁷ : Module R₁ M₁
inst✝⁶ : Module R₁ M'₁
inst✝⁵ : Module R₂ M₂
inst✝⁴ : Module R₃ M₃
inst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
F : Type ?u.670173
inst✝² : Module R₁ M₂
inst✝¹ : TopologicalSpace R₁
inst✝ : ContinuousSMul R₁ M₂
f f' : M₂
⊢ smulRight 1 f = smulRight 1 f' ↔ f = f'