Zulip Chat Archive
Stream: new members
Topic: cases/exists
Iocta (Jul 28 2020 at 22:07):
Documentation says cases x
works on an instance x
of an inductive type. What is the inductive type in cases h ((u n - l)/2)
in this solution?
Jalex Stark (Jul 28 2020 at 22:09):
it's something like \exists N, hN
Anatole Dedecker (Jul 28 2020 at 22:09):
The full thing we apply cases
to is h ((u n - l)/2) (by linarith)
. If you want to see its type, you can just insert a line have := h ((u n - l)/2) (by linarith),
and see the type of this
in the tactic state
Iocta (Jul 28 2020 at 22:11):
this : ∃ (N : ℕ), ∀ (n_1 : ℕ), n_1 ≥ N → |u n_1 - l| ≤ (u n - l) / 2
Jalex Stark (Jul 28 2020 at 22:12):
that looks right; are you still confused about something?
Iocta (Jul 28 2020 at 22:13):
What is inductive about it?
Jalex Stark (Jul 28 2020 at 22:16):
\exists
is an inductive constructor
Jalex Stark (Jul 28 2020 at 22:16):
so are \and
and \or
Patrick Massot (Jul 28 2020 at 22:16):
https://leanprover-community.github.io/mathlib_docs/core/init/logic.html#Exists
Bryan Gin-ge Chen (Jul 28 2020 at 22:18):
Iocta (Jul 28 2020 at 22:19):
thanks, will review that
Last updated: Dec 20 2023 at 11:08 UTC