[GOAL]
α : Type u
⊢ Inhabited (FreeRing α)
[PROOFSTEP]
dsimp only [FreeRing]
[GOAL]
α : Type u
⊢ Inhabited (FreeAbelianGroup (FreeMonoid α))
[PROOFSTEP]
infer_instance
[GOAL]
α : Type u
C : FreeRing α → Prop
z : FreeRing α
hn1 : C (-1)
hb : ∀ (b : α), C (of b)
ha : ∀ (x y : FreeRing α), C x → C y → C (x + y)
hm : ∀ (x y : FreeRing α), C x → C y → C (x * y)
hn : ∀ (x : FreeRing α), C x → C (-x)
h1 : C 1
m✝ : FreeMonoid α
a : α
m : List α
ih : C (FreeAbelianGroup.of m)
⊢ C (FreeAbelianGroup.of (a :: m))
[PROOFSTEP]
convert hm _ _ (hb a) ih
[GOAL]
case h.e'_1
α : Type u
C : FreeRing α → Prop
z : FreeRing α
hn1 : C (-1)
hb : ∀ (b : α), C (of b)
ha : ∀ (x y : FreeRing α), C x → C y → C (x + y)
hm : ∀ (x y : FreeRing α), C x → C y → C (x * y)
hn : ∀ (x : FreeRing α), C x → C (-x)
h1 : C 1
m✝ : FreeMonoid α
a : α
m : List α
ih : C (FreeAbelianGroup.of m)
⊢ FreeAbelianGroup.of (a :: m) = of a * FreeAbelianGroup.of m
[PROOFSTEP]
rw [of, ← FreeAbelianGroup.of_mul]
[GOAL]
case h.e'_1
α : Type u
C : FreeRing α → Prop
z : FreeRing α
hn1 : C (-1)
hb : ∀ (b : α), C (of b)
ha : ∀ (x y : FreeRing α), C x → C y → C (x + y)
hm : ∀ (x y : FreeRing α), C x → C y → C (x * y)
hn : ∀ (x : FreeRing α), C x → C (-x)
h1 : C 1
m✝ : FreeMonoid α
a : α
m : List α
ih : C (FreeAbelianGroup.of m)
⊢ FreeAbelianGroup.of (a :: m) = FreeAbelianGroup.of (FreeMonoid.of a * m)
[PROOFSTEP]
rfl


[GOAL]
R✝ : Type u_1
S : Type u_2
A✝ : Type u_3
B : Type u_4
inst✝¹² : CommSemiring R✝
inst✝¹¹ : CommSemiring S
inst✝¹⁰ : Semiring A✝
inst✝⁹ : Semiring B
inst✝⁸ : Algebra R✝ S
inst✝⁷ : Algebra R✝ A✝
inst✝⁶ : Algebra R✝ B
inst✝⁵ : Algebra S A✝
inst✝⁴ : SMulCommClass R✝ S A✝
inst✝³ : IsScalarTower R✝ S A✝
R : Type ?u.2035
A : Type ?u.2038
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
r : R
x : A
⊢ ↑(RingHom.toOpposite (algebraMap R A)
            (_ :
              ∀ (x y : R),
                ↑(algebraMap R ((fun x => A) x)) x * ↑(algebraMap R A) y =
                  ↑(algebraMap R A) y * ↑(algebraMap R ((fun x => A) x)) x))
        r *
      op x =
    op x *
      ↑(RingHom.toOpposite (algebraMap R A)
            (_ :
              ∀ (x y : R),
                ↑(algebraMap R ((fun x => A) x)) x * ↑(algebraMap R A) y =
                  ↑(algebraMap R A) y * ↑(algebraMap R ((fun x => A) x)) x))
        r
[PROOFSTEP]
simp only [RingHom.toOpposite_apply, Function.comp_apply, ← op_mul, Algebra.commutes]
[GOAL]
R✝ : Type u_1
S : Type u_2
A✝ : Type u_3
B : Type u_4
inst✝¹² : CommSemiring R✝
inst✝¹¹ : CommSemiring S
inst✝¹⁰ : Semiring A✝
inst✝⁹ : Semiring B
inst✝⁸ : Algebra R✝ S
inst✝⁷ : Algebra R✝ A✝
inst✝⁶ : Algebra R✝ B
inst✝⁵ : Algebra S A✝
inst✝⁴ : SMulCommClass R✝ S A✝
inst✝³ : IsScalarTower R✝ S A✝
R : Type ?u.2035
A : Type ?u.2038
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
c : R
x : (fun x => Aᵐᵒᵖ) c
⊢ unop (c • x) =
    unop
      (↑(RingHom.toOpposite (algebraMap R A)
              (_ :
                ∀ (x y : R),
                  ↑(algebraMap R ((fun x => A) x)) x * ↑(algebraMap R A) y =
                    ↑(algebraMap R A) y * ↑(algebraMap R ((fun x => A) x)) x))
          c *
        x)
[PROOFSTEP]
simp only [unop_smul, RingHom.toOpposite_apply, Function.comp_apply, unop_mul, op_mul, Algebra.smul_def,
  Algebra.commutes, op_unop, unop_op]


[GOAL]
ι : Type u_1
G : Type u_2
inst✝³ : Group G
inst✝² : ConditionallyCompleteLattice G
inst✝¹ : CovariantClass G G (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : Nonempty ι
f : ι → G
hf : BddAbove (range f)
a : G
⊢ (⨆ (i : ι), f i) / a = ⨆ (i : ι), f i / a
[PROOFSTEP]
simp only [div_eq_mul_inv, ciSup_mul hf]


[GOAL]
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a b c d : α
src✝¹ : LinearOrderedAddCommMonoidWithTop (WithTop α) := linearOrderedAddCommMonoidWithTop
src✝ : Nontrivial (Option α) := Option.nontrivial
⊢ ∀ (a : WithTop α), a ≠ ⊤ → a + -a = 0
[PROOFSTEP]
rintro (a | a) ha
[GOAL]
case none
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a b c d : α
src✝¹ : LinearOrderedAddCommMonoidWithTop (WithTop α) := linearOrderedAddCommMonoidWithTop
src✝ : Nontrivial (Option α) := Option.nontrivial
ha : none ≠ ⊤
⊢ none + -none = 0
[PROOFSTEP]
exact (ha rfl).elim
[GOAL]
case some
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a✝ b c d : α
src✝¹ : LinearOrderedAddCommMonoidWithTop (WithTop α) := linearOrderedAddCommMonoidWithTop
src✝ : Nontrivial (Option α) := Option.nontrivial
a : α
ha : Option.some a ≠ ⊤
⊢ Option.some a + -Option.some a = 0
[PROOFSTEP]
exact WithTop.coe_add.symm.trans (WithTop.coe_eq_coe.2 (add_neg_self a))


[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hn : IsPeriodicPt f n x
hm : IsPeriodicPt f m x
⊢ IsPeriodicPt f (n + m) x
[PROOFSTEP]
rw [IsPeriodicPt, iterate_add]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hn : IsPeriodicPt f n x
hm : IsPeriodicPt f m x
⊢ IsFixedPt (f^[n] ∘ f^[m]) x
[PROOFSTEP]
exact hn.comp hm
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hn : IsPeriodicPt f (n + m) x
hm : IsPeriodicPt f m x
⊢ IsPeriodicPt f n x
[PROOFSTEP]
rw [IsPeriodicPt, iterate_add] at hn
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hn : IsFixedPt (f^[n] ∘ f^[m]) x
hm : IsPeriodicPt f m x
⊢ IsPeriodicPt f n x
[PROOFSTEP]
exact hn.left_of_comp hm
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hn : IsPeriodicPt f (n + m) x
hm : IsPeriodicPt f n x
⊢ IsPeriodicPt f m x
[PROOFSTEP]
rw [add_comm] at hn
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hn : IsPeriodicPt f (m + n) x
hm : IsPeriodicPt f n x
⊢ IsPeriodicPt f m x
[PROOFSTEP]
exact hn.left_of_add hm
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hm : IsPeriodicPt f m x
hn : IsPeriodicPt f n x
⊢ IsPeriodicPt f (m - n) x
[PROOFSTEP]
cases' le_total n m with h h
[GOAL]
case inl
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hm : IsPeriodicPt f m x
hn : IsPeriodicPt f n x
h : n ≤ m
⊢ IsPeriodicPt f (m - n) x
[PROOFSTEP]
refine' left_of_add _ hn
[GOAL]
case inl
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hm : IsPeriodicPt f m x
hn : IsPeriodicPt f n x
h : n ≤ m
⊢ IsPeriodicPt f (m - n + n) x
[PROOFSTEP]
rwa [tsub_add_cancel_of_le h]
[GOAL]
case inr
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hm : IsPeriodicPt f m x
hn : IsPeriodicPt f n x
h : m ≤ n
⊢ IsPeriodicPt f (m - n) x
[PROOFSTEP]
rw [tsub_eq_zero_iff_le.mpr h]
[GOAL]
case inr
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hm : IsPeriodicPt f m x
hn : IsPeriodicPt f n x
h : m ≤ n
⊢ IsPeriodicPt f 0 x
[PROOFSTEP]
apply isPeriodicPt_zero
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n✝ : ℕ
hm : IsPeriodicPt f m x
n : ℕ
⊢ IsPeriodicPt f (m * n) x
[PROOFSTEP]
simp only [IsPeriodicPt, iterate_mul, hm.isFixedPt.iterate n]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n✝ : ℕ
hm : IsPeriodicPt f m x
n : ℕ
⊢ IsPeriodicPt f (n * m) x
[PROOFSTEP]
simp only [mul_comm n, hm.mul_const n]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m✝ n : ℕ
hf : IsPeriodicPt f n x
m : ℕ
⊢ IsPeriodicPt f^[m] n x
[PROOFSTEP]
rw [IsPeriodicPt, ← iterate_mul, mul_comm, iterate_mul]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m✝ n : ℕ
hf : IsPeriodicPt f n x
m : ℕ
⊢ IsFixedPt f^[n]^[m] x
[PROOFSTEP]
exact hf.isFixedPt.iterate m
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
g : α → α
hco : Function.Commute f g
hf : IsPeriodicPt f n x
hg : IsPeriodicPt g n x
⊢ IsPeriodicPt (f ∘ g) n x
[PROOFSTEP]
rw [IsPeriodicPt, hco.comp_iterate]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
g : α → α
hco : Function.Commute f g
hf : IsPeriodicPt f n x
hg : IsPeriodicPt g n x
⊢ IsFixedPt (f^[n] ∘ g^[n]) x
[PROOFSTEP]
exact IsFixedPt.comp hf hg
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
g : α → α
hco : Function.Commute f g
hfg : IsPeriodicPt (f ∘ g) n x
hg : IsPeriodicPt g n x
⊢ IsPeriodicPt f n x
[PROOFSTEP]
rw [IsPeriodicPt, hco.comp_iterate] at hfg
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
g : α → α
hco : Function.Commute f g
hfg : IsFixedPt (f^[n] ∘ g^[n]) x
hg : IsPeriodicPt g n x
⊢ IsPeriodicPt f n x
[PROOFSTEP]
exact hfg.left_of_comp hg
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m✝ n : ℕ
h : IsPeriodicPt f n x
m : ℕ
⊢ f^[m % n] x = f^[m] x
[PROOFSTEP]
conv_rhs => rw [← Nat.mod_add_div m n, iterate_add_apply, (h.mul_const _).eq]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m✝ n : ℕ
h : IsPeriodicPt f n x
m : ℕ
| f^[m] x
[PROOFSTEP]
rw [← Nat.mod_add_div m n, iterate_add_apply, (h.mul_const _).eq]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m✝ n : ℕ
h : IsPeriodicPt f n x
m : ℕ
| f^[m] x
[PROOFSTEP]
rw [← Nat.mod_add_div m n, iterate_add_apply, (h.mul_const _).eq]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m✝ n : ℕ
h : IsPeriodicPt f n x
m : ℕ
| f^[m] x
[PROOFSTEP]
rw [← Nat.mod_add_div m n, iterate_add_apply, (h.mul_const _).eq]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hm : IsPeriodicPt f m x
hn : IsPeriodicPt f n x
⊢ IsPeriodicPt f (Nat.gcd m n) x
[PROOFSTEP]
revert hm hn
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
⊢ IsPeriodicPt f m x → IsPeriodicPt f n x → IsPeriodicPt f (Nat.gcd m n) x
[PROOFSTEP]
refine' Nat.gcd.induction m n (fun n _ hn => _) fun m n _ ih hm hn => _
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n✝ n : ℕ
x✝ : IsPeriodicPt f 0 x
hn : IsPeriodicPt f n x
⊢ IsPeriodicPt f (Nat.gcd 0 n) x
[PROOFSTEP]
rwa [Nat.gcd_zero_left]
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m✝ n✝ m n : ℕ
x✝ : 0 < m
ih : IsPeriodicPt f (n % m) x → IsPeriodicPt f m x → IsPeriodicPt f (Nat.gcd (n % m) m) x
hm : IsPeriodicPt f m x
hn : IsPeriodicPt f n x
⊢ IsPeriodicPt f (Nat.gcd m n) x
[PROOFSTEP]
rw [Nat.gcd_rec]
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m✝ n✝ m n : ℕ
x✝ : 0 < m
ih : IsPeriodicPt f (n % m) x → IsPeriodicPt f m x → IsPeriodicPt f (Nat.gcd (n % m) m) x
hm : IsPeriodicPt f m x
hn : IsPeriodicPt f n x
⊢ IsPeriodicPt f (Nat.gcd (n % m) m) x
[PROOFSTEP]
exact ih (hn.mod hm) hm
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hx : IsPeriodicPt f n x
hy : IsPeriodicPt f n y
hn : 0 < n
h : f x = f y
⊢ x = y
[PROOFSTEP]
rw [← hx.eq, ← hy.eq, ← iterate_pred_comp_of_pos f hn, comp_apply, comp_apply, h]
[GOAL]
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n✝ : ℕ
f : α → α
n : ℕ
hn : 0 < n
x : α
hx : x ∈ ptsOfPeriod f n
⊢ f (f^[Nat.pred n] x) = x
[PROOFSTEP]
rw [← comp_apply (f := f), comp_iterate_pred_of_pos f hn, hx.eq]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hx : x ∈ periodicPts f
hm : IsPeriodicPt f m (f^[n] x)
⊢ IsPeriodicPt f m x
[PROOFSTEP]
rcases hx with ⟨r, hr, hr'⟩
[GOAL]
case intro.intro
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hm : IsPeriodicPt f m (f^[n] x)
r : ℕ
hr : r > 0
hr' : IsPeriodicPt f r x
⊢ IsPeriodicPt f m x
[PROOFSTEP]
suffices n ≤ (n / r + 1) * r by
  -- porting note: convert used to unfold IsPeriodicPt
  change _ = _
  convert (hm.apply_iterate ((n / r + 1) * r - n)).eq <;>
    rw [← iterate_add_apply, Nat.sub_add_cancel this, iterate_mul, (hr'.iterate _).eq]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hm : IsPeriodicPt f m (f^[n] x)
r : ℕ
hr : r > 0
hr' : IsPeriodicPt f r x
this : n ≤ (n / r + 1) * r
⊢ IsPeriodicPt f m x
[PROOFSTEP]
change _ = _
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hm : IsPeriodicPt f m (f^[n] x)
r : ℕ
hr : r > 0
hr' : IsPeriodicPt f r x
this : n ≤ (n / r + 1) * r
⊢ f^[m] x = x
[PROOFSTEP]
convert (hm.apply_iterate ((n / r + 1) * r - n)).eq
[GOAL]
case h.e'_2.h.e'_4
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hm : IsPeriodicPt f m (f^[n] x)
r : ℕ
hr : r > 0
hr' : IsPeriodicPt f r x
this : n ≤ (n / r + 1) * r
⊢ x = f^[(n / r + 1) * r - n] (f^[n] x)
[PROOFSTEP]
rw [← iterate_add_apply, Nat.sub_add_cancel this, iterate_mul, (hr'.iterate _).eq]
[GOAL]
case h.e'_3
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hm : IsPeriodicPt f m (f^[n] x)
r : ℕ
hr : r > 0
hr' : IsPeriodicPt f r x
this : n ≤ (n / r + 1) * r
⊢ x = f^[(n / r + 1) * r - n] (f^[n] x)
[PROOFSTEP]
rw [← iterate_add_apply, Nat.sub_add_cancel this, iterate_mul, (hr'.iterate _).eq]
[GOAL]
case intro.intro
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hm : IsPeriodicPt f m (f^[n] x)
r : ℕ
hr : r > 0
hr' : IsPeriodicPt f r x
⊢ n ≤ (n / r + 1) * r
[PROOFSTEP]
rw [add_mul, one_mul]
[GOAL]
case intro.intro
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hm : IsPeriodicPt f m (f^[n] x)
r : ℕ
hr : r > 0
hr' : IsPeriodicPt f r x
⊢ n ≤ n / r * r + r
[PROOFSTEP]
exact (Nat.lt_div_mul_add hr).le
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
x : α
⊢ x ∈ ⋃ (n : ℕ) (_ : n > 0), ptsOfPeriod f n ↔ x ∈ periodicPts f
[PROOFSTEP]
simp [mem_periodicPts]
[GOAL]
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
f : α → α
x : α
⊢ IsPeriodicPt f (minimalPeriod f x) x
[PROOFSTEP]
delta minimalPeriod
[GOAL]
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
f : α → α
x : α
⊢ IsPeriodicPt f (if h : x ∈ periodicPts f then Nat.find h else 0) x
[PROOFSTEP]
split_ifs with hx
[GOAL]
case pos
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
f : α → α
x : α
hx : x ∈ periodicPts f
⊢ IsPeriodicPt f (Nat.find hx) x
[PROOFSTEP]
exact (Nat.find_spec hx).2
[GOAL]
case neg
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
f : α → α
x : α
hx : ¬x ∈ periodicPts f
⊢ IsPeriodicPt f 0 x
[PROOFSTEP]
exact isPeriodicPt_zero f x
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
⊢ f^[n + minimalPeriod f x] x = f^[n] x
[PROOFSTEP]
rw [iterate_add_apply]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
⊢ f^[n] (f^[minimalPeriod f x] x) = f^[n] x
[PROOFSTEP]
congr
[GOAL]
case e_a
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
⊢ f^[minimalPeriod f x] x = x
[PROOFSTEP]
exact isPeriodicPt_minimalPeriod f x
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hx : x ∈ periodicPts f
⊢ 0 < minimalPeriod f x
[PROOFSTEP]
simp only [minimalPeriod, dif_pos hx, (Nat.find_spec hx).1.lt]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hx : ¬x ∈ periodicPts f
⊢ minimalPeriod f x = 0
[PROOFSTEP]
simp only [minimalPeriod, dif_neg hx]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : ¬x ∈ periodicPts f
⊢ ¬0 < minimalPeriod f x
[PROOFSTEP]
simp only [minimalPeriod, dif_neg h, lt_irrefl 0, not_false_iff]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
⊢ minimalPeriod f x = 0 ↔ ¬x ∈ periodicPts f
[PROOFSTEP]
rw [← minimalPeriod_pos_iff_mem_periodicPts, not_lt, nonpos_iff_eq_zero]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hn : 0 < n
hx : IsPeriodicPt f n x
⊢ minimalPeriod f x ≤ n
[PROOFSTEP]
rw [minimalPeriod, dif_pos (mk_mem_periodicPts hn hx)]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hn : 0 < n
hx : IsPeriodicPt f n x
⊢ Nat.find (_ : x ∈ periodicPts f) ≤ n
[PROOFSTEP]
exact Nat.find_min' (mk_mem_periodicPts hn hx) ⟨hn, hx⟩
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n✝ : ℕ
hx : x ∈ periodicPts f
n : ℕ
⊢ minimalPeriod f (f^[n] x) = minimalPeriod f x
[PROOFSTEP]
apply
  (IsPeriodicPt.minimalPeriod_le (minimalPeriod_pos_of_mem_periodicPts hx) _).antisymm
    ((isPeriodicPt_of_mem_periodicPts_of_isPeriodicPt_iterate hx (isPeriodicPt_minimalPeriod f _)).minimalPeriod_le
      (minimalPeriod_pos_of_mem_periodicPts _))
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n✝ : ℕ
hx : x ∈ periodicPts f
n : ℕ
⊢ IsPeriodicPt f (minimalPeriod f x) (f^[n] x)
[PROOFSTEP]
exact (isPeriodicPt_minimalPeriod f x).apply_iterate n
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n✝ : ℕ
hx : x ∈ periodicPts f
n : ℕ
⊢ f^[n] x ∈ periodicPts f
[PROOFSTEP]
rcases hx with ⟨m, hm, hx⟩
[GOAL]
case intro.intro
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m✝ n✝ n m : ℕ
hm : m > 0
hx : IsPeriodicPt f m x
⊢ f^[n] x ∈ periodicPts f
[PROOFSTEP]
exact ⟨m, hm, hx.apply_iterate n⟩
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m✝ n✝ m n : ℕ
hm : m < minimalPeriod f x
hmn : f^[m] x = f^[n] x
⊢ m ≤ n
[PROOFSTEP]
by_contra' hmn'
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m✝ n✝ m n : ℕ
hm : m < minimalPeriod f x
hmn : f^[m] x = f^[n] x
hmn' : n < m
⊢ False
[PROOFSTEP]
rw [← Nat.add_sub_of_le hmn'.le, add_comm, iterate_add_apply] at hmn
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m✝ n✝ m n : ℕ
hm : m < minimalPeriod f x
hmn : f^[m - n] (f^[n] x) = f^[n] x
hmn' : n < m
⊢ False
[PROOFSTEP]
exact
  ((IsPeriodicPt.minimalPeriod_le (tsub_pos_of_lt hmn')
            (isPeriodicPt_of_mem_periodicPts_of_isPeriodicPt_iterate
              (minimalPeriod_pos_iff_mem_periodicPts.1 ((zero_le m).trans_lt hm)) hmn)).trans
        (Nat.sub_le m n)).not_lt
    hm
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
⊢ minimalPeriod f x = 1 ↔ IsFixedPt f x
[PROOFSTEP]
refine' ⟨fun h => _, fun h => _⟩
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : minimalPeriod f x = 1
⊢ IsFixedPt f x
[PROOFSTEP]
rw [← iterate_one f]
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : minimalPeriod f x = 1
⊢ IsFixedPt f^[1] x
[PROOFSTEP]
refine' Function.IsPeriodicPt.isFixedPt _
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : minimalPeriod f x = 1
⊢ IsPeriodicPt f 1 x
[PROOFSTEP]
rw [← h]
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : minimalPeriod f x = 1
⊢ IsPeriodicPt f (minimalPeriod f x) x
[PROOFSTEP]
exact isPeriodicPt_minimalPeriod f x
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : IsFixedPt f x
⊢ minimalPeriod f x = 1
[PROOFSTEP]
exact
  ((h.isPeriodicPt 1).minimalPeriod_le Nat.one_pos).antisymm
    (Nat.succ_le_of_lt ((h.isPeriodicPt 1).minimalPeriod_pos Nat.one_pos))
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y✝ : α
m n : ℕ
g : β → β
y : β
⊢ minimalPeriod f x = minimalPeriod g y ↔ ∀ (n : ℕ), IsPeriodicPt f n x ↔ IsPeriodicPt g n y
[PROOFSTEP]
simp_rw [isPeriodicPt_iff_minimalPeriod_dvd, dvd_right_iff_eq]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n p k : ℕ
hp : Fact (Nat.Prime p)
hk : ¬IsPeriodicPt f (p ^ k) x
hk1 : IsPeriodicPt f (p ^ (k + 1)) x
⊢ minimalPeriod f x = p ^ (k + 1)
[PROOFSTEP]
apply Nat.eq_prime_pow_of_dvd_least_prime_pow hp.out
[GOAL]
case h₁
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n p k : ℕ
hp : Fact (Nat.Prime p)
hk : ¬IsPeriodicPt f (p ^ k) x
hk1 : IsPeriodicPt f (p ^ (k + 1)) x
⊢ ¬minimalPeriod f x ∣ p ^ k
[PROOFSTEP]
rwa [← isPeriodicPt_iff_minimalPeriod_dvd]
[GOAL]
case h₂
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n p k : ℕ
hp : Fact (Nat.Prime p)
hk : ¬IsPeriodicPt f (p ^ k) x
hk1 : IsPeriodicPt f (p ^ (k + 1)) x
⊢ minimalPeriod f x ∣ p ^ (k + 1)
[PROOFSTEP]
rwa [← isPeriodicPt_iff_minimalPeriod_dvd]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
g : α → α
h : Function.Commute f g
⊢ minimalPeriod (f ∘ g) x ∣ lcm (minimalPeriod f x) (minimalPeriod g x)
[PROOFSTEP]
rw [← isPeriodicPt_iff_minimalPeriod_dvd]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
g : α → α
h : Function.Commute f g
⊢ IsPeriodicPt (f ∘ g) (lcm (minimalPeriod f x) (minimalPeriod g x)) x
[PROOFSTEP]
exact (isPeriodicPt_minimalPeriod f x).comp_lcm h (isPeriodicPt_minimalPeriod g x)
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
g : α → α
h : Function.Commute f g
hco : coprime (minimalPeriod f x) (minimalPeriod g x)
⊢ minimalPeriod (f ∘ g) x = minimalPeriod f x * minimalPeriod g x
[PROOFSTEP]
apply h.minimalPeriod_of_comp_dvd_mul.antisymm
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
g : α → α
h : Function.Commute f g
hco : coprime (minimalPeriod f x) (minimalPeriod g x)
⊢ minimalPeriod f x * minimalPeriod g x ∣ minimalPeriod (f ∘ g) x
[PROOFSTEP]
suffices :
  ∀ {f g : α → α},
    Commute f g → coprime (minimalPeriod f x) (minimalPeriod g x) → minimalPeriod f x ∣ minimalPeriod (f ∘ g) x
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
g : α → α
h : Function.Commute f g
hco : coprime (minimalPeriod f x) (minimalPeriod g x)
this :
  ∀ {f g : α → α},
    Function.Commute f g → coprime (minimalPeriod f x) (minimalPeriod g x) → minimalPeriod f x ∣ minimalPeriod (f ∘ g) x
⊢ minimalPeriod f x * minimalPeriod g x ∣ minimalPeriod (f ∘ g) x
[PROOFSTEP]
exact hco.mul_dvd_of_dvd_of_dvd (this h hco) (h.comp_eq.symm ▸ this h.symm hco.symm)
[GOAL]
case this
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
g : α → α
h : Function.Commute f g
hco : coprime (minimalPeriod f x) (minimalPeriod g x)
⊢ ∀ {f g : α → α},
    Function.Commute f g → coprime (minimalPeriod f x) (minimalPeriod g x) → minimalPeriod f x ∣ minimalPeriod (f ∘ g) x
[PROOFSTEP]
intro f g h hco
[GOAL]
case this
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x y : α
m n : ℕ
g✝ : α → α
h✝ : Function.Commute f✝ g✝
hco✝ : coprime (minimalPeriod f✝ x) (minimalPeriod g✝ x)
f g : α → α
h : Function.Commute f g
hco : coprime (minimalPeriod f x) (minimalPeriod g x)
⊢ minimalPeriod f x ∣ minimalPeriod (f ∘ g) x
[PROOFSTEP]
refine' hco.dvd_of_dvd_mul_left (IsPeriodicPt.left_of_comp h _ _).minimalPeriod_dvd
[GOAL]
case this.refine'_1
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x y : α
m n : ℕ
g✝ : α → α
h✝ : Function.Commute f✝ g✝
hco✝ : coprime (minimalPeriod f✝ x) (minimalPeriod g✝ x)
f g : α → α
h : Function.Commute f g
hco : coprime (minimalPeriod f x) (minimalPeriod g x)
⊢ IsPeriodicPt (f ∘ g) (minimalPeriod g x * minimalPeriod (f ∘ g) x) x
[PROOFSTEP]
exact (isPeriodicPt_minimalPeriod _ _).const_mul _
[GOAL]
case this.refine'_2
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x y : α
m n : ℕ
g✝ : α → α
h✝ : Function.Commute f✝ g✝
hco✝ : coprime (minimalPeriod f✝ x) (minimalPeriod g✝ x)
f g : α → α
h : Function.Commute f g
hco : coprime (minimalPeriod f x) (minimalPeriod g x)
⊢ IsPeriodicPt g (minimalPeriod g x * minimalPeriod (f ∘ g) x) x
[PROOFSTEP]
exact (isPeriodicPt_minimalPeriod _ _).mul_const _
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : 0 < gcd (minimalPeriod f x) n
⊢ minimalPeriod f^[n] x = minimalPeriod f x / gcd (minimalPeriod f x) n
[PROOFSTEP]
apply Nat.dvd_antisymm
[GOAL]
case a
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : 0 < gcd (minimalPeriod f x) n
⊢ minimalPeriod f^[n] x ∣ minimalPeriod f x / gcd (minimalPeriod f x) n
[PROOFSTEP]
apply IsPeriodicPt.minimalPeriod_dvd
[GOAL]
case a.hx
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : 0 < gcd (minimalPeriod f x) n
⊢ IsPeriodicPt f^[n] (minimalPeriod f x / gcd (minimalPeriod f x) n) x
[PROOFSTEP]
rw [IsPeriodicPt, IsFixedPt, ← iterate_mul, ← Nat.mul_div_assoc _ (gcd_dvd_left _ _), mul_comm,
  Nat.mul_div_assoc _ (gcd_dvd_right _ _), mul_comm, iterate_mul]
[GOAL]
case a.hx
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : 0 < gcd (minimalPeriod f x) n
⊢ f^[n / gcd (minimalPeriod f x) n]^[minimalPeriod f x] x = x
[PROOFSTEP]
exact (isPeriodicPt_minimalPeriod f x).iterate _
[GOAL]
case a
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : 0 < gcd (minimalPeriod f x) n
⊢ minimalPeriod f x / gcd (minimalPeriod f x) n ∣ minimalPeriod f^[n] x
[PROOFSTEP]
apply coprime.dvd_of_dvd_mul_right (coprime_div_gcd_div_gcd h)
[GOAL]
case a
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : 0 < gcd (minimalPeriod f x) n
⊢ minimalPeriod f x / gcd (minimalPeriod f x) n ∣ minimalPeriod f^[n] x * (n / gcd (minimalPeriod f x) n)
[PROOFSTEP]
apply Nat.dvd_of_mul_dvd_mul_right h
[GOAL]
case a
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : 0 < gcd (minimalPeriod f x) n
⊢ minimalPeriod f x / gcd (minimalPeriod f x) n * gcd (minimalPeriod f x) n ∣
    minimalPeriod f^[n] x * (n / gcd (minimalPeriod f x) n) * gcd (minimalPeriod f x) n
[PROOFSTEP]
rw [Nat.div_mul_cancel (gcd_dvd_left _ _), mul_assoc, Nat.div_mul_cancel (gcd_dvd_right _ _), mul_comm]
[GOAL]
case a
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : 0 < gcd (minimalPeriod f x) n
⊢ minimalPeriod f x ∣ n * minimalPeriod f^[n] x
[PROOFSTEP]
apply IsPeriodicPt.minimalPeriod_dvd
[GOAL]
case a.hx
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : 0 < gcd (minimalPeriod f x) n
⊢ IsPeriodicPt f (n * minimalPeriod f^[n] x) x
[PROOFSTEP]
rw [IsPeriodicPt, IsFixedPt, iterate_mul]
[GOAL]
case a.hx
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
h : 0 < gcd (minimalPeriod f x) n
⊢ f^[n]^[minimalPeriod f^[n] x] x = x
[PROOFSTEP]
exact isPeriodicPt_minimalPeriod _ _
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
⊢ Cycle.length (periodicOrbit f x) = minimalPeriod f x
[PROOFSTEP]
rw [periodicOrbit, Cycle.length_coe, List.length_map, List.length_range]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
⊢ periodicOrbit f x = Cycle.nil ↔ ¬x ∈ periodicPts f
[PROOFSTEP]
simp [periodicOrbit]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
⊢ minimalPeriod f x = 0 ↔ ¬x ∈ periodicPts f
[PROOFSTEP]
exact minimalPeriod_eq_zero_iff_nmem_periodicPts
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hx : x ∈ periodicPts f
⊢ y ∈ periodicOrbit f x ↔ ∃ n, f^[n] x = y
[PROOFSTEP]
simp only [periodicOrbit, Cycle.mem_coe_iff, List.mem_map, List.mem_range]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hx : x ∈ periodicPts f
⊢ (∃ a, a < minimalPeriod f x ∧ f^[a] x = y) ↔ ∃ n, f^[n] x = y
[PROOFSTEP]
use fun ⟨a, _, ha'⟩ => ⟨a, ha'⟩
[GOAL]
case mpr
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hx : x ∈ periodicPts f
⊢ (∃ n, f^[n] x = y) → ∃ a, a < minimalPeriod f x ∧ f^[a] x = y
[PROOFSTEP]
rintro ⟨n, rfl⟩
[GOAL]
case mpr.intro
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x : α
m n✝ : ℕ
hx : x ∈ periodicPts f
n : ℕ
⊢ ∃ a, a < minimalPeriod f x ∧ f^[a] x = f^[n] x
[PROOFSTEP]
use n % minimalPeriod f x, mod_lt _ (minimalPeriod_pos_of_mem_periodicPts hx)
[GOAL]
case right
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x : α
m n✝ : ℕ
hx : x ∈ periodicPts f
n : ℕ
⊢ f^[n % minimalPeriod f x] x = f^[n] x
[PROOFSTEP]
rw [iterate_mod_minimalPeriod_eq]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
⊢ Cycle.Nodup (periodicOrbit f x)
[PROOFSTEP]
rw [periodicOrbit, Cycle.nodup_coe_iff, List.nodup_map_iff_inj_on (List.nodup_range _)]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
⊢ ∀ (x_1 : ℕ),
    x_1 ∈ List.range (minimalPeriod f x) → ∀ (y : ℕ), y ∈ List.range (minimalPeriod f x) → f^[x_1] x = f^[y] x → x_1 = y
[PROOFSTEP]
intro m hm n hn hmn
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m✝ n✝ m : ℕ
hm : m ∈ List.range (minimalPeriod f x)
n : ℕ
hn : n ∈ List.range (minimalPeriod f x)
hmn : f^[m] x = f^[n] x
⊢ m = n
[PROOFSTEP]
rw [List.mem_range] at hm hn
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m✝ n✝ m : ℕ
hm : m < minimalPeriod f x
n : ℕ
hn : n < minimalPeriod f x
hmn : f^[m] x = f^[n] x
⊢ m = n
[PROOFSTEP]
rwa [eq_iff_lt_minimalPeriod_of_iterate_eq hm hn] at hmn
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n✝ : ℕ
hx : x ∈ periodicPts f
n : ℕ
⊢ List.rotate (List.map (fun n => f^[n] x) (List.range (minimalPeriod f x))) n =
    List.map (fun n_1 => f^[n_1] (f^[n] x)) (List.range (minimalPeriod f (f^[n] x)))
[PROOFSTEP]
apply List.ext_nthLe _ fun m _ _ => _
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n✝ : ℕ
hx : x ∈ periodicPts f
n : ℕ
⊢ List.length (List.rotate (List.map (fun n => f^[n] x) (List.range (minimalPeriod f x))) n) =
    List.length (List.map (fun n_1 => f^[n_1] (f^[n] x)) (List.range (minimalPeriod f (f^[n] x))))
[PROOFSTEP]
simp [minimalPeriod_apply_iterate hx]
[GOAL]
α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n✝ : ℕ
hx : x ∈ periodicPts f
n : ℕ
⊢ ∀ (m : ℕ) (x_1 : m < List.length (List.rotate (List.map (fun n => f^[n] x) (List.range (minimalPeriod f x))) n))
    (x_2 : m < List.length (List.map (fun n_1 => f^[n_1] (f^[n] x)) (List.range (minimalPeriod f (f^[n] x))))),
    List.nthLe (List.rotate (List.map (fun n => f^[n] x) (List.range (minimalPeriod f x))) n) m x_1 =
      List.nthLe (List.map (fun n_1 => f^[n_1] (f^[n] x)) (List.range (minimalPeriod f (f^[n] x)))) m x_2
[PROOFSTEP]
simp [List.nthLe_rotate, iterate_add_apply]
[GOAL]
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
r : α → α → Prop
f : α → α
x : α
⊢ Cycle.Chain r (periodicOrbit f x) ↔ ∀ (n : ℕ), n < minimalPeriod f x → r (f^[n] x) (f^[n + 1] x)
[PROOFSTEP]
by_cases hx : x ∈ periodicPts f
[GOAL]
case pos
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
r : α → α → Prop
f : α → α
x : α
hx : x ∈ periodicPts f
⊢ Cycle.Chain r (periodicOrbit f x) ↔ ∀ (n : ℕ), n < minimalPeriod f x → r (f^[n] x) (f^[n + 1] x)
[PROOFSTEP]
have hx' := minimalPeriod_pos_of_mem_periodicPts hx
[GOAL]
case pos
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
r : α → α → Prop
f : α → α
x : α
hx : x ∈ periodicPts f
hx' : 0 < minimalPeriod f x
⊢ Cycle.Chain r (periodicOrbit f x) ↔ ∀ (n : ℕ), n < minimalPeriod f x → r (f^[n] x) (f^[n + 1] x)
[PROOFSTEP]
have hM := Nat.sub_add_cancel (succ_le_iff.2 hx')
[GOAL]
case pos
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
r : α → α → Prop
f : α → α
x : α
hx : x ∈ periodicPts f
hx' : 0 < minimalPeriod f x
hM : minimalPeriod f x - succ 0 + succ 0 = minimalPeriod f x
⊢ Cycle.Chain r (periodicOrbit f x) ↔ ∀ (n : ℕ), n < minimalPeriod f x → r (f^[n] x) (f^[n + 1] x)
[PROOFSTEP]
rw [periodicOrbit, ← Cycle.map_coe, Cycle.chain_map, ← hM, Cycle.chain_range_succ]
[GOAL]
case pos
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
r : α → α → Prop
f : α → α
x : α
hx : x ∈ periodicPts f
hx' : 0 < minimalPeriod f x
hM : minimalPeriod f x - succ 0 + succ 0 = minimalPeriod f x
⊢ (r (f^[minimalPeriod f x - succ 0] x) (f^[0] x) ∧
      ∀ (m : ℕ), m < minimalPeriod f x - succ 0 → r (f^[m] x) (f^[succ m] x)) ↔
    ∀ (n : ℕ), n < minimalPeriod f x - succ 0 + succ 0 → r (f^[n] x) (f^[n + 1] x)
[PROOFSTEP]
refine' ⟨_, fun H => ⟨_, fun m hm => H _ (hm.trans (Nat.lt_succ_self _))⟩⟩
[GOAL]
case pos.refine'_1
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
r : α → α → Prop
f : α → α
x : α
hx : x ∈ periodicPts f
hx' : 0 < minimalPeriod f x
hM : minimalPeriod f x - succ 0 + succ 0 = minimalPeriod f x
⊢ (r (f^[minimalPeriod f x - succ 0] x) (f^[0] x) ∧
      ∀ (m : ℕ), m < minimalPeriod f x - succ 0 → r (f^[m] x) (f^[succ m] x)) →
    ∀ (n : ℕ), n < minimalPeriod f x - succ 0 + succ 0 → r (f^[n] x) (f^[n + 1] x)
[PROOFSTEP]
rintro ⟨hr, H⟩ n hn
[GOAL]
case pos.refine'_1.intro
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n✝ : ℕ
r : α → α → Prop
f : α → α
x : α
hx : x ∈ periodicPts f
hx' : 0 < minimalPeriod f x
hM : minimalPeriod f x - succ 0 + succ 0 = minimalPeriod f x
hr : r (f^[minimalPeriod f x - succ 0] x) (f^[0] x)
H : ∀ (m : ℕ), m < minimalPeriod f x - succ 0 → r (f^[m] x) (f^[succ m] x)
n : ℕ
hn : n < minimalPeriod f x - succ 0 + succ 0
⊢ r (f^[n] x) (f^[n + 1] x)
[PROOFSTEP]
cases' eq_or_lt_of_le (lt_succ_iff.1 hn) with hM' hM'
[GOAL]
case pos.refine'_1.intro.inl
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n✝ : ℕ
r : α → α → Prop
f : α → α
x : α
hx : x ∈ periodicPts f
hx' : 0 < minimalPeriod f x
hM : minimalPeriod f x - succ 0 + succ 0 = minimalPeriod f x
hr : r (f^[minimalPeriod f x - succ 0] x) (f^[0] x)
H : ∀ (m : ℕ), m < minimalPeriod f x - succ 0 → r (f^[m] x) (f^[succ m] x)
n : ℕ
hn : n < minimalPeriod f x - succ 0 + succ 0
hM' : n = minimalPeriod f x - succ 0
⊢ r (f^[n] x) (f^[n + 1] x)
[PROOFSTEP]
rwa [hM', hM, iterate_minimalPeriod]
[GOAL]
case pos.refine'_1.intro.inr
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n✝ : ℕ
r : α → α → Prop
f : α → α
x : α
hx : x ∈ periodicPts f
hx' : 0 < minimalPeriod f x
hM : minimalPeriod f x - succ 0 + succ 0 = minimalPeriod f x
hr : r (f^[minimalPeriod f x - succ 0] x) (f^[0] x)
H : ∀ (m : ℕ), m < minimalPeriod f x - succ 0 → r (f^[m] x) (f^[succ m] x)
n : ℕ
hn : n < minimalPeriod f x - succ 0 + succ 0
hM' : n < minimalPeriod f x - succ 0
⊢ r (f^[n] x) (f^[n + 1] x)
[PROOFSTEP]
exact H _ hM'
[GOAL]
case pos.refine'_2
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
r : α → α → Prop
f : α → α
x : α
hx : x ∈ periodicPts f
hx' : 0 < minimalPeriod f x
hM : minimalPeriod f x - succ 0 + succ 0 = minimalPeriod f x
H : ∀ (n : ℕ), n < minimalPeriod f x - succ 0 + succ 0 → r (f^[n] x) (f^[n + 1] x)
⊢ r (f^[minimalPeriod f x - succ 0] x) (f^[0] x)
[PROOFSTEP]
rw [iterate_zero_apply]
[GOAL]
case pos.refine'_2
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
r : α → α → Prop
f : α → α
x : α
hx : x ∈ periodicPts f
hx' : 0 < minimalPeriod f x
hM : minimalPeriod f x - succ 0 + succ 0 = minimalPeriod f x
H : ∀ (n : ℕ), n < minimalPeriod f x - succ 0 + succ 0 → r (f^[n] x) (f^[n + 1] x)
⊢ r (f^[minimalPeriod f x - succ 0] x) x
[PROOFSTEP]
nth_rw 3 [← @iterate_minimalPeriod α f x]
[GOAL]
case pos.refine'_2
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
r : α → α → Prop
f : α → α
x : α
hx : x ∈ periodicPts f
hx' : 0 < minimalPeriod f x
hM : minimalPeriod f x - succ 0 + succ 0 = minimalPeriod f x
H : ∀ (n : ℕ), n < minimalPeriod f x - succ 0 + succ 0 → r (f^[n] x) (f^[n + 1] x)
⊢ r (f^[minimalPeriod f x - succ 0] x) (f^[minimalPeriod f x] x)
[PROOFSTEP]
nth_rw 2 [← hM]
[GOAL]
case pos.refine'_2
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
r : α → α → Prop
f : α → α
x : α
hx : x ∈ periodicPts f
hx' : 0 < minimalPeriod f x
hM : minimalPeriod f x - succ 0 + succ 0 = minimalPeriod f x
H : ∀ (n : ℕ), n < minimalPeriod f x - succ 0 + succ 0 → r (f^[n] x) (f^[n + 1] x)
⊢ r (f^[minimalPeriod f x - succ 0] x) (f^[minimalPeriod f x - succ 0 + succ 0] x)
[PROOFSTEP]
exact H _ (Nat.lt_succ_self _)
[GOAL]
case neg
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
r : α → α → Prop
f : α → α
x : α
hx : ¬x ∈ periodicPts f
⊢ Cycle.Chain r (periodicOrbit f x) ↔ ∀ (n : ℕ), n < minimalPeriod f x → r (f^[n] x) (f^[n + 1] x)
[PROOFSTEP]
rw [periodicOrbit_eq_nil_of_not_periodic_pt hx, minimalPeriod_eq_zero_of_nmem_periodicPts hx]
[GOAL]
case neg
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
r : α → α → Prop
f : α → α
x : α
hx : ¬x ∈ periodicPts f
⊢ Cycle.Chain r Cycle.nil ↔ ∀ (n : ℕ), n < 0 → r (f^[n] x) (f^[n + 1] x)
[PROOFSTEP]
simp
[GOAL]
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
r : α → α → Prop
f : α → α
x : α
hx : x ∈ periodicPts f
⊢ Cycle.Chain r (periodicOrbit f x) ↔ ∀ (n : ℕ), r (f^[n] x) (f^[n + 1] x)
[PROOFSTEP]
rw [periodicOrbit_chain r]
[GOAL]
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
r : α → α → Prop
f : α → α
x : α
hx : x ∈ periodicPts f
⊢ (∀ (n : ℕ), n < minimalPeriod f x → r (f^[n] x) (f^[n + 1] x)) ↔ ∀ (n : ℕ), r (f^[n] x) (f^[n + 1] x)
[PROOFSTEP]
refine' ⟨fun H n => _, fun H n _ => H n⟩
[GOAL]
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n✝ : ℕ
r : α → α → Prop
f : α → α
x : α
hx : x ∈ periodicPts f
H : ∀ (n : ℕ), n < minimalPeriod f x → r (f^[n] x) (f^[n + 1] x)
n : ℕ
⊢ r (f^[n] x) (f^[n + 1] x)
[PROOFSTEP]
rw [iterate_succ_apply, ← iterate_mod_minimalPeriod_eq, ← iterate_mod_minimalPeriod_eq (n := n), ← iterate_succ_apply,
  minimalPeriod_apply hx]
[GOAL]
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n✝ : ℕ
r : α → α → Prop
f : α → α
x : α
hx : x ∈ periodicPts f
H : ∀ (n : ℕ), n < minimalPeriod f x → r (f^[n] x) (f^[n + 1] x)
n : ℕ
⊢ r (f^[n % minimalPeriod f x] x) (f^[succ (n % minimalPeriod f x)] x)
[PROOFSTEP]
exact H _ (mod_lt _ (minimalPeriod_pos_of_mem_periodicPts hx))
[GOAL]
α : Type u_1
β : Type u_2
f✝ : α → α
g✝ : β → β
x : α × β
a : α
b : β
m n✝ : ℕ
f : α → α
g : β → β
n : ℕ
⊢ (Prod.map f g)^[n] = Prod.map f^[n] g^[n]
[PROOFSTEP]
induction n
[GOAL]
case zero
α : Type u_1
β : Type u_2
f✝ : α → α
g✝ : β → β
x : α × β
a : α
b : β
m n : ℕ
f : α → α
g : β → β
⊢ (Prod.map f g)^[Nat.zero] = Prod.map f^[Nat.zero] g^[Nat.zero]
[PROOFSTEP]
simp [*, Prod.map_comp_map]
[GOAL]
case succ
α : Type u_1
β : Type u_2
f✝ : α → α
g✝ : β → β
x : α × β
a : α
b : β
m n : ℕ
f : α → α
g : β → β
n✝ : ℕ
n_ih✝ : (Prod.map f g)^[n✝] = Prod.map f^[n✝] g^[n✝]
⊢ (Prod.map f g)^[Nat.succ n✝] = Prod.map f^[Nat.succ n✝] g^[Nat.succ n✝]
[PROOFSTEP]
simp [*, Prod.map_comp_map]
[GOAL]
α : Type u_1
β : Type u_2
f : α → α
g : β → β
x✝ : α × β
a : α
b : β
m n : ℕ
x : α × β
⊢ IsPeriodicPt (Prod.map f g) n x ↔ IsPeriodicPt f n x.fst ∧ IsPeriodicPt g n x.snd
[PROOFSTEP]
simp [IsPeriodicPt]
[GOAL]
α : Type u_1
β : Type u_2
f✝ : α → α
g✝ : β → β
x✝ : α × β
a : α
b : β
m n : ℕ
f : α → α
g : β → β
x : α × β
⊢ ∀ (c : ℕ), minimalPeriod (Prod.map f g) x ∣ c ↔ Nat.lcm (minimalPeriod f x.fst) (minimalPeriod g x.snd) ∣ c
[PROOFSTEP]
cases x
[GOAL]
case mk
α : Type u_1
β : Type u_2
f✝ : α → α
g✝ : β → β
x : α × β
a : α
b : β
m n : ℕ
f : α → α
g : β → β
fst✝ : α
snd✝ : β
⊢ ∀ (c : ℕ),
    minimalPeriod (Prod.map f g) (fst✝, snd✝) ∣ c ↔
      Nat.lcm (minimalPeriod f (fst✝, snd✝).fst) (minimalPeriod g (fst✝, snd✝).snd) ∣ c
[PROOFSTEP]
simp [← isPeriodicPt_iff_minimalPeriod_dvd, Nat.lcm_dvd_iff]
[GOAL]
α : Type u_1
β : Type u_2
f : α → α
g : β → β
x : α × β
a : α
b : β
m n : ℕ
⊢ minimalPeriod f x.fst ∣ minimalPeriod (Prod.map f g) x
[PROOFSTEP]
rw [minimalPeriod_prod_map]
[GOAL]
α : Type u_1
β : Type u_2
f : α → α
g : β → β
x : α × β
a : α
b : β
m n : ℕ
⊢ minimalPeriod f x.fst ∣ Nat.lcm (minimalPeriod f x.fst) (minimalPeriod g x.snd)
[PROOFSTEP]
exact Nat.dvd_lcm_left _ _
[GOAL]
α : Type u_1
β : Type u_2
f : α → α
g : β → β
x : α × β
a : α
b : β
m n : ℕ
⊢ minimalPeriod g x.snd ∣ minimalPeriod (Prod.map f g) x
[PROOFSTEP]
rw [minimalPeriod_prod_map]
[GOAL]
α : Type u_1
β : Type u_2
f : α → α
g : β → β
x : α × β
a : α
b : β
m n : ℕ
⊢ minimalPeriod g x.snd ∣ Nat.lcm (minimalPeriod f x.fst) (minimalPeriod g x.snd)
[PROOFSTEP]
exact Nat.dvd_lcm_right _ _
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : Group α
inst✝ : MulAction α β
a : α
b : β
n : ℕ
⊢ a ^ n • b = b ↔ minimalPeriod ((fun x x_1 => x • x_1) a) b ∣ n
[PROOFSTEP]
rw [← isPeriodicPt_iff_minimalPeriod_dvd, IsPeriodicPt, IsFixedPt, smul_iterate]
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : Group α
inst✝ : MulAction α β
a : α
b : β
n : ℤ
⊢ a ^ n • b = b ↔ ↑(minimalPeriod ((fun x x_1 => x • x_1) a) b) ∣ n
[PROOFSTEP]
cases n
[GOAL]
case ofNat
α : Type u_1
β : Type u_2
inst✝¹ : Group α
inst✝ : MulAction α β
a : α
b : β
a✝ : ℕ
⊢ a ^ Int.ofNat a✝ • b = b ↔ ↑(minimalPeriod ((fun x x_1 => x • x_1) a) b) ∣ Int.ofNat a✝
[PROOFSTEP]
rw [Int.ofNat_eq_coe, zpow_ofNat, Int.coe_nat_dvd, pow_smul_eq_iff_minimalPeriod_dvd]
[GOAL]
case negSucc
α : Type u_1
β : Type u_2
inst✝¹ : Group α
inst✝ : MulAction α β
a : α
b : β
a✝ : ℕ
⊢ a ^ Int.negSucc a✝ • b = b ↔ ↑(minimalPeriod ((fun x x_1 => x • x_1) a) b) ∣ Int.negSucc a✝
[PROOFSTEP]
rw [Int.negSucc_coe, zpow_neg, zpow_ofNat, inv_smul_eq_iff, eq_comm, dvd_neg, Int.coe_nat_dvd,
  pow_smul_eq_iff_minimalPeriod_dvd]
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : Group α
inst✝ : MulAction α β
a : α
b : β
n : ℕ
⊢ a ^ (n % minimalPeriod ((fun x x_1 => x • x_1) a) b) • b = a ^ n • b
[PROOFSTEP]
conv_rhs =>
  rw [← Nat.mod_add_div n (minimalPeriod ((· • ·) a) b), pow_add, mul_smul,
    pow_smul_eq_iff_minimalPeriod_dvd.mpr (dvd_mul_right _ _)]
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : Group α
inst✝ : MulAction α β
a : α
b : β
n : ℕ
| a ^ n • b
[PROOFSTEP]
rw [← Nat.mod_add_div n (minimalPeriod ((· • ·) a) b), pow_add, mul_smul,
    pow_smul_eq_iff_minimalPeriod_dvd.mpr (dvd_mul_right _ _)]
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : Group α
inst✝ : MulAction α β
a : α
b : β
n : ℕ
| a ^ n • b
[PROOFSTEP]
rw [← Nat.mod_add_div n (minimalPeriod ((· • ·) a) b), pow_add, mul_smul,
    pow_smul_eq_iff_minimalPeriod_dvd.mpr (dvd_mul_right _ _)]
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : Group α
inst✝ : MulAction α β
a : α
b : β
n : ℕ
| a ^ n • b
[PROOFSTEP]
rw [← Nat.mod_add_div n (minimalPeriod ((· • ·) a) b), pow_add, mul_smul,
  pow_smul_eq_iff_minimalPeriod_dvd.mpr (dvd_mul_right _ _)]
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : Group α
inst✝ : MulAction α β
a : α
b : β
n : ℤ
⊢ a ^ (n % ↑(minimalPeriod ((fun x x_1 => x • x_1) a) b)) • b = a ^ n • b
[PROOFSTEP]
conv_rhs =>
  rw [← Int.emod_add_ediv n (minimalPeriod ((a • ·)) b), zpow_add, mul_smul,
    zpow_smul_eq_iff_minimalPeriod_dvd.mpr (dvd_mul_right _ _)]
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : Group α
inst✝ : MulAction α β
a : α
b : β
n : ℤ
| a ^ n • b
[PROOFSTEP]
rw [← Int.emod_add_ediv n (minimalPeriod ((a • ·)) b), zpow_add, mul_smul,
    zpow_smul_eq_iff_minimalPeriod_dvd.mpr (dvd_mul_right _ _)]
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : Group α
inst✝ : MulAction α β
a : α
b : β
n : ℤ
| a ^ n • b
[PROOFSTEP]
rw [← Int.emod_add_ediv n (minimalPeriod ((a • ·)) b), zpow_add, mul_smul,
    zpow_smul_eq_iff_minimalPeriod_dvd.mpr (dvd_mul_right _ _)]
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : Group α
inst✝ : MulAction α β
a : α
b : β
n : ℤ
| a ^ n • b
[PROOFSTEP]
rw [← Int.emod_add_ediv n (minimalPeriod ((a • ·)) b), zpow_add, mul_smul,
  zpow_smul_eq_iff_minimalPeriod_dvd.mpr (dvd_mul_right _ _)]


[GOAL]
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasShift C ℤ
T₁ T₂ T₃ A B : Triangle C
iso₁ : A.obj₁ ≅ B.obj₁
iso₂ : A.obj₂ ≅ B.obj₂
iso₃ : A.obj₃ ≅ B.obj₃
comm₁ : autoParam (A.mor₁ ≫ iso₂.hom = iso₁.hom ≫ B.mor₁) _auto✝
comm₂ : autoParam (A.mor₂ ≫ iso₃.hom = iso₂.hom ≫ B.mor₂) _auto✝
comm₃ : autoParam (A.mor₃ ≫ (shiftFunctor C 1).map iso₁.hom = iso₃.hom ≫ B.mor₃) _auto✝
⊢ B.mor₁ ≫ iso₂.inv = iso₁.inv ≫ A.mor₁
[PROOFSTEP]
simp only [← cancel_mono iso₂.hom, assoc, Iso.inv_hom_id, comp_id, comm₁, Iso.inv_hom_id_assoc]
[GOAL]
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasShift C ℤ
T₁ T₂ T₃ A B : Triangle C
iso₁ : A.obj₁ ≅ B.obj₁
iso₂ : A.obj₂ ≅ B.obj₂
iso₃ : A.obj₃ ≅ B.obj₃
comm₁ : autoParam (A.mor₁ ≫ iso₂.hom = iso₁.hom ≫ B.mor₁) _auto✝
comm₂ : autoParam (A.mor₂ ≫ iso₃.hom = iso₂.hom ≫ B.mor₂) _auto✝
comm₃ : autoParam (A.mor₃ ≫ (shiftFunctor C 1).map iso₁.hom = iso₃.hom ≫ B.mor₃) _auto✝
⊢ B.mor₂ ≫ iso₃.inv = iso₂.inv ≫ A.mor₂
[PROOFSTEP]
simp only [← cancel_mono iso₃.hom, assoc, Iso.inv_hom_id, comp_id, comm₂, Iso.inv_hom_id_assoc]
[GOAL]
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasShift C ℤ
T₁ T₂ T₃ A B : Triangle C
iso₁ : A.obj₁ ≅ B.obj₁
iso₂ : A.obj₂ ≅ B.obj₂
iso₃ : A.obj₃ ≅ B.obj₃
comm₁ : autoParam (A.mor₁ ≫ iso₂.hom = iso₁.hom ≫ B.mor₁) _auto✝
comm₂ : autoParam (A.mor₂ ≫ iso₃.hom = iso₂.hom ≫ B.mor₂) _auto✝
comm₃ : autoParam (A.mor₃ ≫ (shiftFunctor C 1).map iso₁.hom = iso₃.hom ≫ B.mor₃) _auto✝
⊢ B.mor₃ ≫ (shiftFunctor C 1).map iso₁.inv = iso₃.inv ≫ A.mor₃
[PROOFSTEP]
simp only [← cancel_mono (iso₁.hom⟦(1 : ℤ)⟧'), Category.assoc, comm₃, Iso.inv_hom_id_assoc, ← Functor.map_comp,
  Iso.inv_hom_id, Functor.map_id, Category.comp_id]


[GOAL]
α : Type u_1
R : Type u_2
inst✝ : DivisionRing R
n : ℕ
⊢ ↑(-↑n) = -↑n
[PROOFSTEP]
simp
[GOAL]
α : Type u_1
inst✝ : DivisionRing α
m n : ℤ
n_dvd : n ∣ m
n_nonzero : ↑n ≠ 0
⊢ ↑(m / n) = ↑m / ↑n
[PROOFSTEP]
rcases n_dvd with ⟨k, rfl⟩
[GOAL]
case intro
α : Type u_1
inst✝ : DivisionRing α
n : ℤ
n_nonzero : ↑n ≠ 0
k : ℤ
⊢ ↑(n * k / n) = ↑(n * k) / ↑n
[PROOFSTEP]
have : n ≠ 0 := by
  rintro rfl
  simp at n_nonzero
[GOAL]
α : Type u_1
inst✝ : DivisionRing α
n : ℤ
n_nonzero : ↑n ≠ 0
k : ℤ
⊢ n ≠ 0
[PROOFSTEP]
rintro rfl
[GOAL]
α : Type u_1
inst✝ : DivisionRing α
k : ℤ
n_nonzero : ↑0 ≠ 0
⊢ False
[PROOFSTEP]
simp at n_nonzero
[GOAL]
case intro
α : Type u_1
inst✝ : DivisionRing α
n : ℤ
n_nonzero : ↑n ≠ 0
k : ℤ
this : n ≠ 0
⊢ ↑(n * k / n) = ↑(n * k) / ↑n
[PROOFSTEP]
rw [Int.mul_ediv_cancel_left _ this, mul_comm n k, Int.cast_mul, mul_div_cancel _ n_nonzero]


[GOAL]
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
x✝² x✝¹ : Opens α
carrier✝¹ : Set α
is_open'✝¹ : IsOpen carrier✝¹
carrier✝ : Set α
is_open'✝ : IsOpen carrier✝
x✝ : { carrier := carrier✝¹, is_open' := is_open'✝¹ }.carrier = { carrier := carrier✝, is_open' := is_open'✝ }.carrier
⊢ { carrier := carrier✝¹, is_open' := is_open'✝¹ } = { carrier := carrier✝, is_open' := is_open'✝ }
[PROOFSTEP]
congr
[GOAL]
ι✝ : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
ι : Sort u_5
s : ι → Opens α
⊢ ↑(⨆ (i : ι), s i) = ⋃ (i : ι), ↑(s i)
[PROOFSTEP]
simp [iSup]
[GOAL]
ι✝ : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
ι : Sort u_5
x : α
s : ι → Opens α
⊢ x ∈ iSup s ↔ ∃ i, x ∈ s i
[PROOFSTEP]
rw [← SetLike.mem_coe]
[GOAL]
ι✝ : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
ι : Sort u_5
x : α
s : ι → Opens α
⊢ x ∈ ↑(iSup s) ↔ ∃ i, x ∈ s i
[PROOFSTEP]
simp
[GOAL]
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
Us : Set (Opens α)
x : α
⊢ x ∈ sSup Us ↔ ∃ u, u ∈ Us ∧ x ∈ u
[PROOFSTEP]
simp_rw [sSup_eq_iSup, mem_iSup, exists_prop]
[GOAL]
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
src✝ : CompleteLattice (Opens α) := inferInstanceAs (CompleteLattice (Opens α))
a : Opens α
s : Set (Opens α)
⊢ ↑(a ⊓ sSup s) = ↑(⨆ (b : Opens α) (_ : b ∈ s), a ⊓ b)
[PROOFSTEP]
simp only [coe_inf, coe_iSup, coe_sSup, Set.inter_iUnion₂]
[GOAL]
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
U V : Opens α
i : U ≤ V
⊢ IsOpen (range (inclusion (_ : ↑U ⊆ ↑V)))
[PROOFSTEP]
rw [Set.range_inclusion i]
[GOAL]
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
U V : Opens α
i : U ≤ V
⊢ IsOpen {x | ↑x ∈ ↑U}
[PROOFSTEP]
exact U.isOpen.preimage continuous_subtype_val
[GOAL]
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
U : Opens α
⊢ ¬Set.Nonempty ↑U ↔ U = ⊥
[PROOFSTEP]
rw [← coe_inj, coe_bot, ← Set.not_nonempty_iff_eq_empty]
[GOAL]
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
U : Opens α
⊢ U ≠ ⊥ ↔ Set.Nonempty ↑U
[PROOFSTEP]
rw [Ne.def, ← not_nonempty_iff_eq_bot, not_not]
[GOAL]
ι : Type u_1
α✝ : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α✝
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
α : Type u_5
t : TopologicalSpace α
h : t = ⊤
U : Opens α
⊢ U = ⊥ ∨ U = ⊤
[PROOFSTEP]
subst h
[GOAL]
ι : Type u_1
α✝ : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α✝
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
α : Type u_5
U : Opens α
⊢ U = ⊥ ∨ U = ⊤
[PROOFSTEP]
letI : TopologicalSpace α := ⊤
[GOAL]
ι : Type u_1
α✝ : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α✝
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
α : Type u_5
U : Opens α
this : TopologicalSpace α := ⊤
⊢ U = ⊥ ∨ U = ⊤
[PROOFSTEP]
rw [← coe_eq_empty, ← coe_eq_univ, ← isOpen_top_iff]
[GOAL]
ι : Type u_1
α✝ : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α✝
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
α : Type u_5
U : Opens α
this : TopologicalSpace α := ⊤
⊢ IsOpen ↑U
[PROOFSTEP]
exact U.2
[GOAL]
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
⊢ IsBasis B ↔ ∀ {U : Opens α} {x : α}, x ∈ U → ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ U
[PROOFSTEP]
constructor
[GOAL]
case mp
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
⊢ IsBasis B → ∀ {U : Opens α} {x : α}, x ∈ U → ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ U
[PROOFSTEP]
intro h
[GOAL]
case mpr
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
⊢ (∀ {U : Opens α} {x : α}, x ∈ U → ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ U) → IsBasis B
[PROOFSTEP]
intro h
[GOAL]
case mp
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
h : IsBasis B
⊢ ∀ {U : Opens α} {x : α}, x ∈ U → ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ U
[PROOFSTEP]
rintro ⟨sU, hU⟩ x hx
[GOAL]
case mp.mk
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
h : IsBasis B
sU : Set α
hU : IsOpen sU
x : α
hx : x ∈ { carrier := sU, is_open' := hU }
⊢ ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ { carrier := sU, is_open' := hU }
[PROOFSTEP]
rcases h.mem_nhds_iff.mp (IsOpen.mem_nhds hU hx) with ⟨sV, ⟨⟨V, H₁, H₂⟩, hsV⟩⟩
[GOAL]
case mp.mk.intro.intro.intro.intro
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
h : IsBasis B
sU : Set α
hU : IsOpen sU
x : α
hx : x ∈ { carrier := sU, is_open' := hU }
sV : Set α
hsV : x ∈ sV ∧ sV ⊆ sU
V : Opens α
H₁ : V ∈ B
H₂ : ↑V = sV
⊢ ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ { carrier := sU, is_open' := hU }
[PROOFSTEP]
refine' ⟨V, H₁, _⟩
[GOAL]
case mp.mk.intro.intro.intro.intro
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
h : IsBasis B
sU : Set α
hU : IsOpen sU
x : α
hx : x ∈ { carrier := sU, is_open' := hU }
sV : Set α
hsV : x ∈ sV ∧ sV ⊆ sU
V : Opens α
H₁ : V ∈ B
H₂ : ↑V = sV
⊢ x ∈ V ∧ V ≤ { carrier := sU, is_open' := hU }
[PROOFSTEP]
cases V
[GOAL]
case mp.mk.intro.intro.intro.intro.mk
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
h : IsBasis B
sU : Set α
hU : IsOpen sU
x : α
hx : x ∈ { carrier := sU, is_open' := hU }
sV : Set α
hsV : x ∈ sV ∧ sV ⊆ sU
carrier✝ : Set α
is_open'✝ : IsOpen carrier✝
H₁ : { carrier := carrier✝, is_open' := is_open'✝ } ∈ B
H₂ : ↑{ carrier := carrier✝, is_open' := is_open'✝ } = sV
⊢ x ∈ { carrier := carrier✝, is_open' := is_open'✝ } ∧
    { carrier := carrier✝, is_open' := is_open'✝ } ≤ { carrier := sU, is_open' := hU }
[PROOFSTEP]
dsimp at H₂
[GOAL]
case mp.mk.intro.intro.intro.intro.mk
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
h : IsBasis B
sU : Set α
hU : IsOpen sU
x : α
hx : x ∈ { carrier := sU, is_open' := hU }
sV : Set α
hsV : x ∈ sV ∧ sV ⊆ sU
carrier✝ : Set α
is_open'✝ : IsOpen carrier✝
H₁ : { carrier := carrier✝, is_open' := is_open'✝ } ∈ B
H₂ : carrier✝ = sV
⊢ x ∈ { carrier := carrier✝, is_open' := is_open'✝ } ∧
    { carrier := carrier✝, is_open' := is_open'✝ } ≤ { carrier := sU, is_open' := hU }
[PROOFSTEP]
subst H₂
[GOAL]
case mp.mk.intro.intro.intro.intro.mk
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
h : IsBasis B
sU : Set α
hU : IsOpen sU
x : α
hx : x ∈ { carrier := sU, is_open' := hU }
carrier✝ : Set α
is_open'✝ : IsOpen carrier✝
H₁ : { carrier := carrier✝, is_open' := is_open'✝ } ∈ B
hsV : x ∈ carrier✝ ∧ carrier✝ ⊆ sU
⊢ x ∈ { carrier := carrier✝, is_open' := is_open'✝ } ∧
    { carrier := carrier✝, is_open' := is_open'✝ } ≤ { carrier := sU, is_open' := hU }
[PROOFSTEP]
exact hsV
[GOAL]
case mpr
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
h : ∀ {U : Opens α} {x : α}, x ∈ U → ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ U
⊢ IsBasis B
[PROOFSTEP]
refine' isTopologicalBasis_of_open_of_nhds _ _
[GOAL]
case mpr.refine'_1
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
h : ∀ {U : Opens α} {x : α}, x ∈ U → ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ U
⊢ ∀ (u : Set α), u ∈ SetLike.coe '' B → IsOpen u
[PROOFSTEP]
rintro sU ⟨U, -, rfl⟩
[GOAL]
case mpr.refine'_1.intro.intro
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
h : ∀ {U : Opens α} {x : α}, x ∈ U → ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ U
U : Opens α
⊢ IsOpen ↑U
[PROOFSTEP]
exact U.2
[GOAL]
case mpr.refine'_2
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
h : ∀ {U : Opens α} {x : α}, x ∈ U → ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ U
⊢ ∀ (a : α) (u : Set α), a ∈ u → IsOpen u → ∃ v, v ∈ SetLike.coe '' B ∧ a ∈ v ∧ v ⊆ u
[PROOFSTEP]
intro x sU hx hsU
[GOAL]
case mpr.refine'_2
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
h : ∀ {U : Opens α} {x : α}, x ∈ U → ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ U
x : α
sU : Set α
hx : x ∈ sU
hsU : IsOpen sU
⊢ ∃ v, v ∈ SetLike.coe '' B ∧ x ∈ v ∧ v ⊆ sU
[PROOFSTEP]
rcases@h ⟨sU, hsU⟩ x hx with ⟨V, hV, H⟩
[GOAL]
case mpr.refine'_2.intro.intro
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
h : ∀ {U : Opens α} {x : α}, x ∈ U → ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ U
x : α
sU : Set α
hx : x ∈ sU
hsU : IsOpen sU
V : Opens α
hV : V ∈ B
H : x ∈ V ∧ V ≤ { carrier := sU, is_open' := hsU }
⊢ ∃ v, v ∈ SetLike.coe '' B ∧ x ∈ v ∧ v ⊆ sU
[PROOFSTEP]
exact ⟨V, ⟨V, hV, rfl⟩, H⟩
[GOAL]
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
⊢ IsBasis B ↔ ∀ (U : Opens α), ∃ Us, Us ⊆ B ∧ U = sSup Us
[PROOFSTEP]
constructor
[GOAL]
case mp
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
⊢ IsBasis B → ∀ (U : Opens α), ∃ Us, Us ⊆ B ∧ U = sSup Us
[PROOFSTEP]
intro hB U
[GOAL]
case mp
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
hB : IsBasis B
U : Opens α
⊢ ∃ Us, Us ⊆ B ∧ U = sSup Us
[PROOFSTEP]
refine ⟨{V : Opens α | V ∈ B ∧ V ≤ U}, fun U hU => hU.left, ext ?_⟩
[GOAL]
case mp
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
hB : IsBasis B
U : Opens α
⊢ ↑U = ↑(sSup {V | V ∈ B ∧ V ≤ U})
[PROOFSTEP]
rw [coe_sSup, hB.open_eq_sUnion' U.isOpen]
[GOAL]
case mp
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
hB : IsBasis B
U : Opens α
⊢ ⋃₀ {s | s ∈ SetLike.coe '' B ∧ s ⊆ ↑U} = ⋃ (i : Opens α) (_ : i ∈ {V | V ∈ B ∧ V ≤ U}), ↑i
[PROOFSTEP]
simp_rw [sUnion_eq_biUnion, iUnion, mem_setOf_eq, iSup_and, iSup_image]
[GOAL]
case mp
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
hB : IsBasis B
U : Opens α
⊢ ⨆ (b : Opens α) (_ : b ∈ B) (_ : ↑b ⊆ ↑U), ↑b = ⨆ (i : Opens α) (_ : i ∈ B) (_ : i ≤ U), ↑i
[PROOFSTEP]
rfl
[GOAL]
case mpr
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
⊢ (∀ (U : Opens α), ∃ Us, Us ⊆ B ∧ U = sSup Us) → IsBasis B
[PROOFSTEP]
intro h
[GOAL]
case mpr
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
h : ∀ (U : Opens α), ∃ Us, Us ⊆ B ∧ U = sSup Us
⊢ IsBasis B
[PROOFSTEP]
rw [isBasis_iff_nbhd]
[GOAL]
case mpr
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
h : ∀ (U : Opens α), ∃ Us, Us ⊆ B ∧ U = sSup Us
⊢ ∀ {U : Opens α} {x : α}, x ∈ U → ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ U
[PROOFSTEP]
intro U x hx
[GOAL]
case mpr
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
h : ∀ (U : Opens α), ∃ Us, Us ⊆ B ∧ U = sSup Us
U : Opens α
x : α
hx : x ∈ U
⊢ ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ U
[PROOFSTEP]
rcases h U with ⟨Us, hUs, rfl⟩
[GOAL]
case mpr.intro.intro
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
h : ∀ (U : Opens α), ∃ Us, Us ⊆ B ∧ U = sSup Us
x : α
Us : Set (Opens α)
hUs : Us ⊆ B
hx : x ∈ sSup Us
⊢ ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ sSup Us
[PROOFSTEP]
rcases mem_sSup.1 hx with ⟨U, Us, xU⟩
[GOAL]
case mpr.intro.intro.intro.intro
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
B : Set (Opens α)
h : ∀ (U : Opens α), ∃ Us, Us ⊆ B ∧ U = sSup Us
x : α
Us✝ : Set (Opens α)
hUs : Us✝ ⊆ B
hx : x ∈ sSup Us✝
U : Opens α
Us : U ∈ Us✝
xU : x ∈ U
⊢ ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ sSup Us✝
[PROOFSTEP]
exact ⟨U, hUs Us, xU, le_sSup Us⟩
[GOAL]
ι✝ : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
ι : Type u_5
b : ι → Opens α
hb : IsBasis (range b)
hb' : ∀ (i : ι), IsCompact ↑(b i)
U : Set α
⊢ IsCompact U ∧ IsOpen U ↔ ∃ s, Set.Finite s ∧ U = ⋃ (i : ι) (_ : i ∈ s), ↑(b i)
[PROOFSTEP]
apply isCompact_open_iff_eq_finite_iUnion_of_isTopologicalBasis fun i : ι => (b i).1
[GOAL]
case hb
ι✝ : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
ι : Type u_5
b : ι → Opens α
hb : IsBasis (range b)
hb' : ∀ (i : ι), IsCompact ↑(b i)
U : Set α
⊢ IsTopologicalBasis (range fun i => (b i).carrier)
[PROOFSTEP]
convert (config := { transparency := .default }) hb
[GOAL]
case h.e'_3
ι✝ : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
ι : Type u_5
b : ι → Opens α
hb : IsBasis (range b)
hb' : ∀ (i : ι), IsCompact ↑(b i)
U : Set α
⊢ (range fun i => (b i).carrier) = SetLike.coe '' range b
[PROOFSTEP]
ext
[GOAL]
case h.e'_3.h
ι✝ : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
ι : Type u_5
b : ι → Opens α
hb : IsBasis (range b)
hb' : ∀ (i : ι), IsCompact ↑(b i)
U x✝ : Set α
⊢ (x✝ ∈ range fun i => (b i).carrier) ↔ x✝ ∈ SetLike.coe '' range b
[PROOFSTEP]
simp
[GOAL]
case hb'
ι✝ : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
ι : Type u_5
b : ι → Opens α
hb : IsBasis (range b)
hb' : ∀ (i : ι), IsCompact ↑(b i)
U : Set α
⊢ ∀ (i : ι), IsCompact (b i).carrier
[PROOFSTEP]
exact hb'
[GOAL]
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Opens α
⊢ CompleteLattice.IsCompactElement s ↔ IsCompact ↑s
[PROOFSTEP]
rw [isCompact_iff_finite_subcover, CompleteLattice.isCompactElement_iff]
[GOAL]
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Opens α
⊢ (∀ (ι : Type u_2) (s_1 : ι → Opens α), s ≤ iSup s_1 → ∃ t, s ≤ Finset.sup t s_1) ↔
    ∀ {ι : Type u_2} (U : ι → Set α),
      (∀ (i : ι), IsOpen (U i)) → ↑s ⊆ ⋃ (i : ι), U i → ∃ t, ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), U i
[PROOFSTEP]
refine' ⟨_, fun H ι U hU => _⟩
[GOAL]
case refine'_1
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Opens α
⊢ (∀ (ι : Type u_2) (s_1 : ι → Opens α), s ≤ iSup s_1 → ∃ t, s ≤ Finset.sup t s_1) →
    ∀ {ι : Type u_2} (U : ι → Set α),
      (∀ (i : ι), IsOpen (U i)) → ↑s ⊆ ⋃ (i : ι), U i → ∃ t, ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), U i
[PROOFSTEP]
introv H hU hU'
[GOAL]
case refine'_1
ι✝ : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Opens α
H : ∀ (ι : Type u_2) (s_1 : ι → Opens α), s ≤ iSup s_1 → ∃ t, s ≤ Finset.sup t s_1
ι : Type u_2
U : ι → Set α
hU : ∀ (i : ι), IsOpen (U i)
hU' : ↑s ⊆ ⋃ (i : ι), U i
⊢ ∃ t, ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), U i
[PROOFSTEP]
obtain ⟨t, ht⟩ := H ι (fun i => ⟨U i, hU i⟩) (by simpa)
[GOAL]
ι✝ : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Opens α
H : ∀ (ι : Type u_2) (s_1 : ι → Opens α), s ≤ iSup s_1 → ∃ t, s ≤ Finset.sup t s_1
ι : Type u_2
U : ι → Set α
hU : ∀ (i : ι), IsOpen (U i)
hU' : ↑s ⊆ ⋃ (i : ι), U i
⊢ s ≤ ⨆ (i : ι), { carrier := U i, is_open' := (_ : IsOpen (U i)) }
[PROOFSTEP]
simpa
[GOAL]
case refine'_1.intro
ι✝ : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Opens α
H : ∀ (ι : Type u_2) (s_1 : ι → Opens α), s ≤ iSup s_1 → ∃ t, s ≤ Finset.sup t s_1
ι : Type u_2
U : ι → Set α
hU : ∀ (i : ι), IsOpen (U i)
hU' : ↑s ⊆ ⋃ (i : ι), U i
t : Finset ι
ht : s ≤ Finset.sup t fun i => { carrier := U i, is_open' := (_ : IsOpen (U i)) }
⊢ ∃ t, ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), U i
[PROOFSTEP]
refine' ⟨t, Set.Subset.trans ht _⟩
[GOAL]
case refine'_1.intro
ι✝ : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Opens α
H : ∀ (ι : Type u_2) (s_1 : ι → Opens α), s ≤ iSup s_1 → ∃ t, s ≤ Finset.sup t s_1
ι : Type u_2
U : ι → Set α
hU : ∀ (i : ι), IsOpen (U i)
hU' : ↑s ⊆ ⋃ (i : ι), U i
t : Finset ι
ht : s ≤ Finset.sup t fun i => { carrier := U i, is_open' := (_ : IsOpen (U i)) }
⊢ ↑(Finset.sup t fun i => { carrier := U i, is_open' := (_ : IsOpen (U i)) }) ⊆ ⋃ (i : ι) (_ : i ∈ t), U i
[PROOFSTEP]
rw [coe_finset_sup, Finset.sup_eq_iSup]
[GOAL]
case refine'_1.intro
ι✝ : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Opens α
H : ∀ (ι : Type u_2) (s_1 : ι → Opens α), s ≤ iSup s_1 → ∃ t, s ≤ Finset.sup t s_1
ι : Type u_2
U : ι → Set α
hU : ∀ (i : ι), IsOpen (U i)
hU' : ↑s ⊆ ⋃ (i : ι), U i
t : Finset ι
ht : s ≤ Finset.sup t fun i => { carrier := U i, is_open' := (_ : IsOpen (U i)) }
⊢ ⨆ (a : ι) (_ : a ∈ t), (SetLike.coe ∘ fun i => { carrier := U i, is_open' := (_ : IsOpen (U i)) }) a ⊆
    ⋃ (i : ι) (_ : i ∈ t), U i
[PROOFSTEP]
rfl
[GOAL]
case refine'_2
ι✝ : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Opens α
H :
  ∀ {ι : Type u_2} (U : ι → Set α),
    (∀ (i : ι), IsOpen (U i)) → ↑s ⊆ ⋃ (i : ι), U i → ∃ t, ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), U i
ι : Type u_2
U : ι → Opens α
hU : s ≤ iSup U
⊢ ∃ t, s ≤ Finset.sup t U
[PROOFSTEP]
obtain ⟨t, ht⟩ := H (fun i => U i) (fun i => (U i).isOpen) (by simpa using show (s : Set α) ⊆ ↑(iSup U) from hU)
[GOAL]
ι✝ : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Opens α
H :
  ∀ {ι : Type u_2} (U : ι → Set α),
    (∀ (i : ι), IsOpen (U i)) → ↑s ⊆ ⋃ (i : ι), U i → ∃ t, ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), U i
ι : Type u_2
U : ι → Opens α
hU : s ≤ iSup U
⊢ ↑s ⊆ ⋃ (i : ι), (fun i => ↑(U i)) i
[PROOFSTEP]
simpa using show (s : Set α) ⊆ ↑(iSup U) from hU
[GOAL]
case refine'_2.intro
ι✝ : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Opens α
H :
  ∀ {ι : Type u_2} (U : ι → Set α),
    (∀ (i : ι), IsOpen (U i)) → ↑s ⊆ ⋃ (i : ι), U i → ∃ t, ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), U i
ι : Type u_2
U : ι → Opens α
hU : s ≤ iSup U
t : Finset ι
ht : ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(U i)
⊢ ∃ t, s ≤ Finset.sup t U
[PROOFSTEP]
refine' ⟨t, Set.Subset.trans ht _⟩
[GOAL]
case refine'_2.intro
ι✝ : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Opens α
H :
  ∀ {ι : Type u_2} (U : ι → Set α),
    (∀ (i : ι), IsOpen (U i)) → ↑s ⊆ ⋃ (i : ι), U i → ∃ t, ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), U i
ι : Type u_2
U : ι → Opens α
hU : s ≤ iSup U
t : Finset ι
ht : ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(U i)
⊢ ⋃ (i : ι) (_ : i ∈ t), ↑(U i) ⊆ ↑(Finset.sup t U)
[PROOFSTEP]
simp only [Set.iUnion_subset_iff]
[GOAL]
case refine'_2.intro
ι✝ : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Opens α
H :
  ∀ {ι : Type u_2} (U : ι → Set α),
    (∀ (i : ι), IsOpen (U i)) → ↑s ⊆ ⋃ (i : ι), U i → ∃ t, ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), U i
ι : Type u_2
U : ι → Opens α
hU : s ≤ iSup U
t : Finset ι
ht : ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(U i)
⊢ ∀ (i : ι), i ∈ t → ↑(U i) ⊆ ↑(Finset.sup t U)
[PROOFSTEP]
show ∀ i ∈ t, U i ≤ t.sup U
[GOAL]
case refine'_2.intro
ι✝ : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Opens α
H :
  ∀ {ι : Type u_2} (U : ι → Set α),
    (∀ (i : ι), IsOpen (U i)) → ↑s ⊆ ⋃ (i : ι), U i → ∃ t, ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), U i
ι : Type u_2
U : ι → Opens α
hU : s ≤ iSup U
t : Finset ι
ht : ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(U i)
⊢ ∀ (i : ι), i ∈ t → U i ≤ Finset.sup t U
[PROOFSTEP]
exact fun i => Finset.le_sup
[GOAL]
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : C(α, β)
s : Set (Opens β)
⊢ ↑(InfHom.toFun
        {
            toInfHom :=
              { toFun := fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) },
                map_inf' :=
                  (_ :
                    ∀ (a b : Opens β),
                      (fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) }) (a ⊓ b) =
                        (fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) }) (a ⊓ b)) },
            map_top' :=
              (_ :
                InfHom.toFun
                    { toFun := fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) },
                      map_inf' :=
                        (_ :
                          ∀ (a b : Opens β),
                            (fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) }) (a ⊓ b) =
                              (fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) })
                                (a ⊓ b)) }
                    ⊤ =
                  InfHom.toFun
                    { toFun := fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) },
                      map_inf' :=
                        (_ :
                          ∀ (a b : Opens β),
                            (fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) }) (a ⊓ b) =
                              (fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) })
                                (a ⊓ b)) }
                    ⊤) }.toInfHom
        (sSup s)) =
    ↑(sSup
        ({
                toInfHom :=
                  { toFun := fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) },
                    map_inf' :=
                      (_ :
                        ∀ (a b : Opens β),
                          (fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) }) (a ⊓ b) =
                            (fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) }) (a ⊓ b)) },
                map_top' :=
                  (_ :
                    InfHom.toFun
                        { toFun := fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) },
                          map_inf' :=
                            (_ :
                              ∀ (a b : Opens β),
                                (fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) })
                                    (a ⊓ b) =
                                  (fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) })
                                    (a ⊓ b)) }
                        ⊤ =
                      InfHom.toFun
                        { toFun := fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) },
                          map_inf' :=
                            (_ :
                              ∀ (a b : Opens β),
                                (fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) })
                                    (a ⊓ b) =
                                  (fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) })
                                    (a ⊓ b)) }
                        ⊤) }.toInfHom.toFun ''
          s))
[PROOFSTEP]
simp only [coe_sSup, preimage_iUnion, biUnion_image, coe_mk]
[GOAL]
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : α ≃ₜ β
⊢ ∀ {a b : Opens α},
    ↑{ toFun := ↑(comap (Homeomorph.toContinuousMap (Homeomorph.symm f))),
              invFun := ↑(comap (Homeomorph.toContinuousMap f)),
              left_inv :=
                (_ :
                  ∀ (U : Opens α),
                    ↑(comap (Homeomorph.toContinuousMap f))
                        (↑(comap (Homeomorph.toContinuousMap (Homeomorph.symm f))) U) =
                      U),
              right_inv :=
                (_ :
                  ∀ (U : Opens β),
                    ↑(comap (Homeomorph.toContinuousMap (Homeomorph.symm f)))
                        (↑(comap (Homeomorph.toContinuousMap f)) U) =
                      U) }
          a ≤
        ↑{ toFun := ↑(comap (Homeomorph.toContinuousMap (Homeomorph.symm f))),
              invFun := ↑(comap (Homeomorph.toContinuousMap f)),
              left_inv :=
                (_ :
                  ∀ (U : Opens α),
                    ↑(comap (Homeomorph.toContinuousMap f))
                        (↑(comap (Homeomorph.toContinuousMap (Homeomorph.symm f))) U) =
                      U),
              right_inv :=
                (_ :
                  ∀ (U : Opens β),
                    ↑(comap (Homeomorph.toContinuousMap (Homeomorph.symm f)))
                        (↑(comap (Homeomorph.toContinuousMap f)) U) =
                      U) }
          b ↔
      a ≤ b
[PROOFSTEP]
simp only [← SetLike.coe_subset_coe]
[GOAL]
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : α ≃ₜ β
⊢ ∀ {a b : Opens α},
    ↑(↑{ toFun := ↑(comap (Homeomorph.toContinuousMap (Homeomorph.symm f))),
                invFun := ↑(comap (Homeomorph.toContinuousMap f)),
                left_inv :=
                  (_ :
                    ∀ (U : Opens α),
                      ↑(comap (Homeomorph.toContinuousMap f))
                          (↑(comap (Homeomorph.toContinuousMap (Homeomorph.symm f))) U) =
                        U),
                right_inv :=
                  (_ :
                    ∀ (U : Opens β),
                      ↑(comap (Homeomorph.toContinuousMap (Homeomorph.symm f)))
                          (↑(comap (Homeomorph.toContinuousMap f)) U) =
                        U) }
            a) ⊆
        ↑(↑{ toFun := ↑(comap (Homeomorph.toContinuousMap (Homeomorph.symm f))),
                invFun := ↑(comap (Homeomorph.toContinuousMap f)),
                left_inv :=
                  (_ :
                    ∀ (U : Opens α),
                      ↑(comap (Homeomorph.toContinuousMap f))
                          (↑(comap (Homeomorph.toContinuousMap (Homeomorph.symm f))) U) =
                        U),
                right_inv :=
                  (_ :
                    ∀ (U : Opens β),
                      ↑(comap (Homeomorph.toContinuousMap (Homeomorph.symm f)))
                          (↑(comap (Homeomorph.toContinuousMap f)) U) =
                        U) }
            b) ↔
      ↑a ⊆ ↑b
[PROOFSTEP]
exact f.symm.surjective.preimage_subset_preimage_iff


[GOAL]
⊢ ↑LinearMap.det (AlgEquiv.toLinearMap conjAe) = -1
[PROOFSTEP]
rw [← LinearMap.det_toMatrix basisOneI, toMatrix_conjAe, Matrix.det_fin_two_of]
[GOAL]
⊢ 1 * -1 - 0 * 0 = -1
[PROOFSTEP]
simp
[GOAL]
⊢ ↑LinearEquiv.det (AlgEquiv.toLinearEquiv conjAe) = -1
[PROOFSTEP]
rw [← Units.eq_iff, LinearEquiv.coe_det, AlgEquiv.toLinearEquiv_toLinearMap, det_conjAe, Units.coe_neg_one]


[GOAL]
m n : ℕ
⊢ ↑m - ↑n ≤ ↑(m - n)
[PROOFSTEP]
by_cases h : m ≥ n
[GOAL]
case pos
m n : ℕ
h : m ≥ n
⊢ ↑m - ↑n ≤ ↑(m - n)
[PROOFSTEP]
exact le_of_eq (Int.ofNat_sub h).symm
[GOAL]
case neg
m n : ℕ
h : ¬m ≥ n
⊢ ↑m - ↑n ≤ ↑(m - n)
[PROOFSTEP]
simp [le_of_not_ge h, ofNat_le]
[GOAL]
n : ℕ
⊢ 0 ≤ ↑n
[PROOFSTEP]
simp
[GOAL]
a✝ b✝ : ℤ
n : ℕ
a b : ℤ
⊢ natAbs a = natAbs b ↔ a ^ 2 = b ^ 2
[PROOFSTEP]
rw [sq, sq]
[GOAL]
a✝ b✝ : ℤ
n : ℕ
a b : ℤ
⊢ natAbs a = natAbs b ↔ a * a = b * b
[PROOFSTEP]
exact natAbs_eq_iff_mul_self_eq
[GOAL]
a✝ b✝ : ℤ
n : ℕ
a b : ℤ
⊢ natAbs a < natAbs b ↔ a ^ 2 < b ^ 2
[PROOFSTEP]
rw [sq, sq]
[GOAL]
a✝ b✝ : ℤ
n : ℕ
a b : ℤ
⊢ natAbs a < natAbs b ↔ a * a < b * b
[PROOFSTEP]
exact natAbs_lt_iff_mul_self_lt
[GOAL]
a✝ b✝ : ℤ
n : ℕ
a b : ℤ
⊢ natAbs a ≤ natAbs b ↔ a ^ 2 ≤ b ^ 2
[PROOFSTEP]
rw [sq, sq]
[GOAL]
a✝ b✝ : ℤ
n : ℕ
a b : ℤ
⊢ natAbs a ≤ natAbs b ↔ a * a ≤ b * b
[PROOFSTEP]
exact natAbs_le_iff_mul_self_le
[GOAL]
a✝ b✝ : ℤ
n : ℕ
a b : ℤ
ha : 0 ≤ a
hb : 0 ≤ b
⊢ natAbs a = natAbs b ↔ a = b
[PROOFSTEP]
rw [← sq_eq_sq ha hb, ← natAbs_eq_iff_sq_eq]
[GOAL]
a✝ b✝ : ℤ
n : ℕ
a b : ℤ
ha : a ≤ 0
hb : b ≤ 0
⊢ natAbs a = natAbs b ↔ a = b
[PROOFSTEP]
simpa only [Int.natAbs_neg, neg_inj] using
  natAbs_inj_of_nonneg_of_nonneg (neg_nonneg_of_nonpos ha) (neg_nonneg_of_nonpos hb)
[GOAL]
a✝ b✝ : ℤ
n : ℕ
a b : ℤ
ha : 0 ≤ a
hb : b ≤ 0
⊢ natAbs a = natAbs b ↔ a = -b
[PROOFSTEP]
simpa only [Int.natAbs_neg] using natAbs_inj_of_nonneg_of_nonneg ha (neg_nonneg_of_nonpos hb)
[GOAL]
a✝ b✝ : ℤ
n : ℕ
a b : ℤ
ha : a ≤ 0
hb : 0 ≤ b
⊢ natAbs a = natAbs b ↔ -a = b
[PROOFSTEP]
simpa only [Int.natAbs_neg] using natAbs_inj_of_nonneg_of_nonneg (neg_nonneg_of_nonpos ha) hb
[GOAL]
a✝ b✝ : ℤ
n : ℕ
a : ℤ
x✝ : a ∈ Iic 0
b : ℤ
hb : b ∈ Iic 0
hab : a < b
⊢ natAbs b < natAbs a
[PROOFSTEP]
simpa [Int.natAbs_neg] using natAbs_lt_natAbs_of_nonneg_of_lt (Right.nonneg_neg_iff.mpr hb) (neg_lt_neg_iff.mpr hab)
[GOAL]
a b : ℤ
n✝ n : ℕ
h : ↑(n + 1) ≤ 0
⊢ 0 < ↑(n + 1)
[PROOFSTEP]
simp
[GOAL]
a b✝ : ℤ
n✝ : ℕ
b : Bool
n : ℤ
⊢ div2 (bit b n) = n
[PROOFSTEP]
rw [bit_val, div2_val, add_comm, Int.add_mul_ediv_left, (_ : (_ / 2 : ℤ) = 0), zero_add]
[GOAL]
a b✝ : ℤ
n✝ : ℕ
b : Bool
n : ℤ
⊢ (bif b then 1 else 0) / 2 = 0
case H a b✝ : ℤ n✝ : ℕ b : Bool n : ℤ ⊢ 2 ≠ 0
[PROOFSTEP]
cases b
[GOAL]
case false
a b : ℤ
n✝ : ℕ
n : ℤ
⊢ (bif false then 1 else 0) / 2 = 0
[PROOFSTEP]
simp
[GOAL]
case true
a b : ℤ
n✝ : ℕ
n : ℤ
⊢ (bif true then 1 else 0) / 2 = 0
[PROOFSTEP]
show ofNat _ = _
[GOAL]
case true
a b : ℤ
n✝ : ℕ
n : ℤ
⊢ ofNat (1 / 2) = 0
[PROOFSTEP]
rw [Nat.div_eq_zero]
[GOAL]
case true
a b : ℤ
n✝ : ℕ
n : ℤ
⊢ ofNat 0 = 0
[PROOFSTEP]
simp
[GOAL]
case true
a b : ℤ
n✝ : ℕ
n : ℤ
⊢ 1 < 2
[PROOFSTEP]
simp
[GOAL]
case H
a b✝ : ℤ
n✝ : ℕ
b : Bool
n : ℤ
⊢ 2 ≠ 0
[PROOFSTEP]
decide


[GOAL]
M : Type u_1
G : Type u_2
α : Type u_3
inst✝⁵ : Monoid M
inst✝⁴ : Group G
inst✝³ : TopologicalSpace α
inst✝² : MulAction M α
inst✝¹ : MulAction G α
inst✝ : ContinuousConstSMul M α
⊢ IsMinimal M α ↔ ∀ (s : Set α), IsClosed s → (∀ (c : M), c • s ⊆ s) → s = ∅ ∨ s = univ
[PROOFSTEP]
constructor
[GOAL]
case mp
M : Type u_1
G : Type u_2
α : Type u_3
inst✝⁵ : Monoid M
inst✝⁴ : Group G
inst✝³ : TopologicalSpace α
inst✝² : MulAction M α
inst✝¹ : MulAction G α
inst✝ : ContinuousConstSMul M α
⊢ IsMinimal M α → ∀ (s : Set α), IsClosed s → (∀ (c : M), c • s ⊆ s) → s = ∅ ∨ s = univ
[PROOFSTEP]
intro _ _
[GOAL]
case mp
M : Type u_1
G : Type u_2
α : Type u_3
inst✝⁵ : Monoid M
inst✝⁴ : Group G
inst✝³ : TopologicalSpace α
inst✝² : MulAction M α
inst✝¹ : MulAction G α
inst✝ : ContinuousConstSMul M α
a✝ : IsMinimal M α
s✝ : Set α
⊢ IsClosed s✝ → (∀ (c : M), c • s✝ ⊆ s✝) → s✝ = ∅ ∨ s✝ = univ
[PROOFSTEP]
exact eq_empty_or_univ_of_smul_invariant_closed M
[GOAL]
case mpr
M : Type u_1
G : Type u_2
α : Type u_3
inst✝⁵ : Monoid M
inst✝⁴ : Group G
inst✝³ : TopologicalSpace α
inst✝² : MulAction M α
inst✝¹ : MulAction G α
inst✝ : ContinuousConstSMul M α
⊢ (∀ (s : Set α), IsClosed s → (∀ (c : M), c • s ⊆ s) → s = ∅ ∨ s = univ) → IsMinimal M α
[PROOFSTEP]
refine' fun H ↦ ⟨fun _ ↦ dense_iff_closure_eq.2 <| (H _ _ _).resolve_left _⟩
[GOAL]
case mpr.refine'_1
M : Type u_1
G : Type u_2
α : Type u_3
inst✝⁵ : Monoid M
inst✝⁴ : Group G
inst✝³ : TopologicalSpace α
inst✝² : MulAction M α
inst✝¹ : MulAction G α
inst✝ : ContinuousConstSMul M α
H : ∀ (s : Set α), IsClosed s → (∀ (c : M), c • s ⊆ s) → s = ∅ ∨ s = univ
x✝ : α
⊢ IsClosed (closure (orbit M x✝))
case mpr.refine'_2
M : Type u_1
G : Type u_2
α : Type u_3
inst✝⁵ : Monoid M
inst✝⁴ : Group G
inst✝³ : TopologicalSpace α
inst✝² : MulAction M α
inst✝¹ : MulAction G α
inst✝ : ContinuousConstSMul M α
H : ∀ (s : Set α), IsClosed s → (∀ (c : M), c • s ⊆ s) → s = ∅ ∨ s = univ
x✝ : α
⊢ ∀ (c : M), c • closure (orbit M x✝) ⊆ closure (orbit M x✝)
case mpr.refine'_3
M : Type u_1
G : Type u_2
α : Type u_3
inst✝⁵ : Monoid M
inst✝⁴ : Group G
inst✝³ : TopologicalSpace α
inst✝² : MulAction M α
inst✝¹ : MulAction G α
inst✝ : ContinuousConstSMul M α
H : ∀ (s : Set α), IsClosed s → (∀ (c : M), c • s ⊆ s) → s = ∅ ∨ s = univ
x✝ : α
⊢ ¬closure (orbit M x✝) = ∅
[PROOFSTEP]
exacts [isClosed_closure, fun _ ↦ smul_closure_orbit_subset _ _, (orbit_nonempty _).closure.ne_empty]


[GOAL]
q : ℚ
⊢ sqrt (q * q) = |q|
[PROOFSTEP]
rw [sqrt, mul_self_num, mul_self_den, Int.sqrt_eq, Nat.sqrt_eq, abs_def, divInt_ofNat]
[GOAL]
x : ℚ
x✝ : ∃ q, q * q = x
n : ℚ
hn : n * n = x
⊢ sqrt x * sqrt x = x
[PROOFSTEP]
rw [← hn, sqrt_eq, abs_mul_abs_self]


[GOAL]
m : Type u_1
n : Type u_2
R : Type u_3
S : Type u_4
inst✝³ : DecidableEq m
inst✝² : Fintype m
inst✝¹ : CommRing R
inst✝ : Nontrivial R
⊢ det (mvPolynomialX m m R) ≠ 0
[PROOFSTEP]
intro h_det
[GOAL]
m : Type u_1
n : Type u_2
R : Type u_3
S : Type u_4
inst✝³ : DecidableEq m
inst✝² : Fintype m
inst✝¹ : CommRing R
inst✝ : Nontrivial R
h_det : det (mvPolynomialX m m R) = 0
⊢ False
[PROOFSTEP]
have := congr_arg Matrix.det (mvPolynomialX_mapMatrix_eval (1 : Matrix m m R))
[GOAL]
m : Type u_1
n : Type u_2
R : Type u_3
S : Type u_4
inst✝³ : DecidableEq m
inst✝² : Fintype m
inst✝¹ : CommRing R
inst✝ : Nontrivial R
h_det : det (mvPolynomialX m m R) = 0
this : det (↑(RingHom.mapMatrix (MvPolynomial.eval fun p => OfNat.ofNat 1 p.fst p.snd)) (mvPolynomialX m m R)) = det 1
⊢ False
[PROOFSTEP]
rw [det_one, ← RingHom.map_det, h_det, RingHom.map_zero] at this
[GOAL]
m : Type u_1
n : Type u_2
R : Type u_3
S : Type u_4
inst✝³ : DecidableEq m
inst✝² : Fintype m
inst✝¹ : CommRing R
inst✝ : Nontrivial R
h_det : det (mvPolynomialX m m R) = 0
this : 0 = 1
⊢ False
[PROOFSTEP]
exact zero_ne_one this


[GOAL]
α : Type u
β : Type v
φ : Ultrafilter α
inst✝ : GroupWithZero β
src✝¹ : DivInvMonoid (Germ (↑φ) β) := divInvMonoid
src✝ : MonoidWithZero (Germ (↑φ) β) := monoidWithZero
⊢ ((fun x x_1 => x ∘ x_1) Inv.inv fun x => 0) =ᶠ[↑φ] fun x => 0
[PROOFSTEP]
simp only [Function.comp, inv_zero]
[GOAL]
α : Type u
β : Type v
φ : Ultrafilter α
inst✝ : GroupWithZero β
src✝¹ : DivInvMonoid (Germ (↑φ) β) := divInvMonoid
src✝ : MonoidWithZero (Germ (↑φ) β) := monoidWithZero
⊢ (fun x => 0) =ᶠ[↑φ] fun x => 0
[PROOFSTEP]
exact EventuallyEq.refl _ fun _ => 0
[GOAL]
α : Type u
β : Type v
φ : Ultrafilter α
inst✝ : Preorder β
f g : α → β
⊢ ↑f < ↑g ↔ ∀* (x : α), f x < g x
[PROOFSTEP]
simp only [lt_iff_le_not_le, eventually_and, coe_le, eventually_not, EventuallyLE]
[GOAL]
α : Type u
β : Type v
φ : Ultrafilter α
inst✝ : Preorder β
⊢ (fun x x_1 => x < x_1) = LiftRel fun x x_1 => x < x_1
[PROOFSTEP]
ext ⟨f⟩ ⟨g⟩
[GOAL]
case h.mk.h.mk.a
α : Type u
β : Type v
φ : Ultrafilter α
inst✝ : Preorder β
x✝¹ : Germ (↑φ) β
f : α → β
x✝ : Germ (↑φ) β
g : α → β
⊢ Quot.mk Setoid.r f < Quot.mk Setoid.r g ↔ LiftRel (fun x x_1 => x < x_1) (Quot.mk Setoid.r f) (Quot.mk Setoid.r g)
[PROOFSTEP]
exact coe_lt
[GOAL]
α : Type u
β : Type v
φ : Ultrafilter α
inst✝ : LinearOrder β
x y : Germ (↑φ) β
a b : α → β
⊢ max ↑a ↑b = map₂ max ↑a ↑b
[PROOFSTEP]
cases' le_total (a : β*) b with h h
[GOAL]
case inl
α : Type u
β : Type v
φ : Ultrafilter α
inst✝ : LinearOrder β
x y : Germ (↑φ) β
a b : α → β
h : ↑a ≤ ↑b
⊢ max ↑a ↑b = map₂ max ↑a ↑b
[PROOFSTEP]
rw [max_eq_right h, map₂_coe, coe_eq]
[GOAL]
case inl
α : Type u
β : Type v
φ : Ultrafilter α
inst✝ : LinearOrder β
x y : Germ (↑φ) β
a b : α → β
h : ↑a ≤ ↑b
⊢ b =ᶠ[↑φ] fun x => max (a x) (b x)
[PROOFSTEP]
exact h.mono fun i hi => (max_eq_right hi).symm
[GOAL]
case inr
α : Type u
β : Type v
φ : Ultrafilter α
inst✝ : LinearOrder β
x y : Germ (↑φ) β
a b : α → β
h : ↑b ≤ ↑a
⊢ max ↑a ↑b = map₂ max ↑a ↑b
[PROOFSTEP]
rw [max_eq_left h, map₂_coe, coe_eq]
[GOAL]
case inr
α : Type u
β : Type v
φ : Ultrafilter α
inst✝ : LinearOrder β
x y : Germ (↑φ) β
a b : α → β
h : ↑b ≤ ↑a
⊢ a =ᶠ[↑φ] fun x => max (a x) (b x)
[PROOFSTEP]
exact h.mono fun i hi => (max_eq_left hi).symm
[GOAL]
α : Type u
β : Type v
φ : Ultrafilter α
K : LinearOrder β
x y : Germ (↑φ) β
a b : α → β
⊢ min ↑a ↑b = map₂ min ↑a ↑b
[PROOFSTEP]
cases' le_total (a : β*) b with h h
[GOAL]
case inl
α : Type u
β : Type v
φ : Ultrafilter α
K : LinearOrder β
x y : Germ (↑φ) β
a b : α → β
h : ↑a ≤ ↑b
⊢ min ↑a ↑b = map₂ min ↑a ↑b
[PROOFSTEP]
rw [min_eq_left h, map₂_coe, coe_eq]
[GOAL]
case inl
α : Type u
β : Type v
φ : Ultrafilter α
K : LinearOrder β
x y : Germ (↑φ) β
a b : α → β
h : ↑a ≤ ↑b
⊢ a =ᶠ[↑φ] fun x => min (a x) (b x)
[PROOFSTEP]
exact h.mono fun i hi => (min_eq_left hi).symm
[GOAL]
case inr
α : Type u
β : Type v
φ : Ultrafilter α
K : LinearOrder β
x y : Germ (↑φ) β
a b : α → β
h : ↑b ≤ ↑a
⊢ min ↑a ↑b = map₂ min ↑a ↑b
[PROOFSTEP]
rw [min_eq_right h, map₂_coe, coe_eq]
[GOAL]
case inr
α : Type u
β : Type v
φ : Ultrafilter α
K : LinearOrder β
x y : Germ (↑φ) β
a b : α → β
h : ↑b ≤ ↑a
⊢ b =ᶠ[↑φ] fun x => min (a x) (b x)
[PROOFSTEP]
exact h.mono fun i hi => (min_eq_right hi).symm
[GOAL]
α : Type u
β : Type v
φ : Ultrafilter α
inst✝ : LinearOrder β
x y : β
⊢ ↑(max x y) = max ↑x ↑y
[PROOFSTEP]
rw [max_def, map₂_const]
[GOAL]
α : Type u
β : Type v
φ : Ultrafilter α
inst✝ : LinearOrder β
x y : β
⊢ ↑(min x y) = min ↑x ↑y
[PROOFSTEP]
rw [min_def, map₂_const]
[GOAL]
α : Type u
β : Type v
φ : Ultrafilter α
inst✝ : LinearOrderedAddCommGroup β
x : β
⊢ ↑|x| = |↑x|
[PROOFSTEP]
rw [abs_def, map_const]