Built with Alectryon, running Coq+SerAPI v8.18.0+0.18.3. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑Ctrl+↓ to navigate, Ctrl+🖱️ to focus. On Mac, use ⌘ instead of Ctrl.
[Loading ML file number_string_notation_plugin.cmxs (using legacy method) ... done]
Require Import HoTT.Truncations.Core.Require Import HoTT.Spaces.Nat.Core.Sectionbounded_search.Context (P : nat -> Type)
(P_dec : foralln, Decidable (P n))
(P_inhab : hexists (funn => P n)).(** We open type_scope again after nat_scope in order to use the product type notation. *)LocalOpen Scope nat_scope.LocalOpen Scope type_scope.Local Definitionminimal (n : nat) : Type := forallm : nat, P m -> n <= m.(** If we assume [Funext], then [minimal n] is a proposition. But to avoid needing [Funext], we propositionally truncate it. *)Local Definitionmin_n_Type : Type := { n : nat & merely (P n) * merely (minimal n) }.
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n)
IsHProp min_n_Type
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n)
IsHProp min_n_Type
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n)
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n)
smaller 0 + (foralll : nat, l <= 0 -> ~ P l)
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat IHn: smaller n + (foralll : nat, l <= n -> ~ P l)
smaller n.+1 + (foralll : nat, l <= n.+1 -> ~ P l)
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n)
smaller 0 + (foralll : nat, l <= 0 -> ~ P l)
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) X: P 0 + ~ P 0
smaller 0 + (foralll : nat, l <= 0 -> ~ P l)
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) h: P 0
smaller 0 + (foralll : nat, l <= 0 -> ~ P l)
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: ~ P 0
smaller 0 + (foralll : nat, l <= 0 -> ~ P l)
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) h: P 0
smaller 0 + (foralll : nat, l <= 0 -> ~ P l)
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) h: P 0
smaller 0
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) h: P 0
minimal 0
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) h: P 0
minimal 0
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) h: P 0 m: nat X: P m
0 <= m
exact _.
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: ~ P 0
smaller 0 + (foralll : nat, l <= 0 -> ~ P l)
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: ~ P 0
foralll : nat, l <= 0 -> ~ P l
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: ~ P 0 l: nat lleq0: l <= 0
~ P l
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: ~ P 0 l: nat lleq0: l <= 0 l0: l = 0
~ P l
rewrite l0; assumption.
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat IHn: smaller n + (foralll : nat, l <= n -> ~ P l)
smaller n.+1 + (foralll : nat, l <= n.+1 -> ~ P l)
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat s: smaller n
smaller n.+1 + (foralll : nat, l <= n.+1 -> ~ P l)
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l
smaller n.+1 + (foralll : nat, l <= n.+1 -> ~ P l)
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat s: smaller n
smaller n.+1 + (foralll : nat, l <= n.+1 -> ~ P l)
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat s: smaller n
smaller n.+1
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat s: smaller n
smaller n
assumption.
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l
smaller n.+1 + (foralll : nat, l <= n.+1 -> ~ P l)
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l X: P n.+1 + ~ P n.+1
smaller n.+1 + (foralll : nat, l <= n.+1 -> ~ P l)
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l h: P n.+1
smaller n.+1 + (foralll : nat, l <= n.+1 -> ~ P l)
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l n1: ~ P n.+1
smaller n.+1 + (foralll : nat, l <= n.+1 -> ~ P l)
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l h: P n.+1
smaller n.+1 + (foralll : nat, l <= n.+1 -> ~ P l)
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l h: P n.+1
smaller n.+1
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l h: P n.+1
minimal n.+1
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l h: P n.+1
minimal n.+1
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l h: P n.+1 m: nat pm: P m
n.+1 <= m
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l h: P n.+1 m: nat pm: P m X: (n.+1 <= m) + (n.+1 > m)
n.+1 <= m
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l h: P n.+1 m: nat pm: P m leqSnm: n.+1 <= m
n.+1 <= m
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l h: P n.+1 m: nat pm: P m ltmSn: n.+1 > m
n.+1 <= m
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l h: P n.+1 m: nat pm: P m leqSnm: n.+1 <= m
n.+1 <= m
assumption.
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l h: P n.+1 m: nat pm: P m ltmSn: n.+1 > m
n.+1 <= m
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l h: P n.+1 m: nat pm: P m ltmSn: m.+1 <= n.+1
n.+1 <= m
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l h: P n.+1 m: nat pm: P m ltmSn: m.+1 <= n.+1 X: m <= n
n.+1 <= m
destruct (n0 m X pm).
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l n1: ~ P n.+1
smaller n.+1 + (foralll : nat, l <= n.+1 -> ~ P l)
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l n1: ~ P n.+1
foralll : nat, l <= n.+1 -> ~ P l
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l n1: ~ P n.+1 l: nat q: l <= n.+1
~ P l
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l n1: ~ P n.+1 l: nat q: l <= n.+1 X: (l <= n) + (l > n)
~ P l
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l n1: ~ P n.+1 l: nat q: l <= n.+1 h: l <= n
~ P l
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l n1: ~ P n.+1 l: nat q: l <= n.+1 h: l > n
~ P l
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l n1: ~ P n.+1 l: nat q: l <= n.+1 h: l <= n
~ P l
exact (n0 l h).
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l n1: ~ P n.+1 l: nat q: l <= n.+1 h: l > n
~ P l
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l n1: ~ P n.+1 l: nat q: l <= n.+1 h: l > n
~ P l
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat n0: foralll : nat, l <= n -> ~ P l n1: ~ P n.+1 l: nat q: l <= n.+1 h: l > n eqlSn: l = n.+1
~ P l
rewrite eqlSn; assumption.Defined.
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat Pn: P n
min_n_Type
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat Pn: P n
min_n_Type
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat Pn: P n X: smaller n + (foralll : nat, l <= n -> ~ P l)
min_n_Type
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat Pn: P n l: nat Pl: P l ml: minimal l leqln: l <= n
min_n_Type
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat Pn: P n none: foralll : nat, l <= n -> ~ P l
min_n_Type
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat Pn: P n l: nat Pl: P l ml: minimal l leqln: l <= n
min_n_Type
exact (l;(tr Pl,tr ml)).
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat Pn: P n none: foralll : nat, l <= n -> ~ P l
min_n_Type
destruct (none n (leq_refl n) Pn).Defined.
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n)
min_n_Type
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n)
min_n_Type
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n)
{n : nat & P n} -> min_n_Type
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n) n: nat Pn: P n
min_n_Type
exact (n_to_min_n n Pn).Defined.
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n)
{n : nat & P n}
P: nat -> Type P_dec: foralln : nat, Decidable (P n) P_inhab: hexists (funn : nat => P n)
exact (n; fst merely_inhabited_iff_inhabited_stable p).Defined.Endbounded_search.Sectionbounded_search_alt_type.Context (X : Type)
(e : nat <~> X)
(P : X -> Type)
(P_dec : forallx, Decidable (P x))
(P_inhab : hexists (funx => P x)).(** Bounded search works for types equivalent to the naturals even without full univalence. *)
X: Type e: nat <~> X P: X -> Type P_dec: forallx : X, Decidable (P x) P_inhab: hexists (funx : X => P x)
{x : X & P x}
X: Type e: nat <~> X P: X -> Type P_dec: forallx : X, Decidable (P x) P_inhab: hexists (funx : X => P x)
{x : X & P x}
X: Type e: nat <~> X P: X -> Type P_dec: forallx : X, Decidable (P x) P_inhab: hexists (funx : X => P x) P':= funn : nat => P (e n): nat -> Type
{x : X & P x}
X: Type e: nat <~> X P: X -> Type P_dec: forallx : X, Decidable (P x) P_inhab: hexists (funx : X => P x) P':= funn : nat => P (e n): nat -> Type P'_dec: foralln : nat, Decidable (P' n)
{x : X & P x}
X: Type e: nat <~> X P: X -> Type P_dec: forallx : X, Decidable (P x) P_inhab: hexists (funx : X => P x) P':= funn : nat => P (e n): nat -> Type P'_dec: foralln : nat, Decidable (P' n)
hexists (funn : nat => P' n)
X: Type e: nat <~> X P: X -> Type P_dec: forallx : X, Decidable (P x) P_inhab: hexists (funx : X => P x) P':= funn : nat => P (e n): nat -> Type P'_dec: foralln : nat, Decidable (P' n) P'_inhab: hexists (funn : nat => P' n)
{x : X & P x}
X: Type e: nat <~> X P: X -> Type P_dec: forallx : X, Decidable (P x) P_inhab: hexists (funx : X => P x) P':= funn : nat => P (e n): nat -> Type P'_dec: foralln : nat, Decidable (P' n)
hexists (funn : nat => P' n)
X: Type e: nat <~> X P: X -> Type P_dec: forallx : X, Decidable (P x) P':= funn : nat => P (e n): nat -> Type P'_dec: foralln : nat, Decidable (P' n) P_inhab: {x : X & P x}
hexists (funn : nat => P' n)
X: Type e: nat <~> X P: X -> Type P_dec: forallx : X, Decidable (P x) P':= funn : nat => P (e n): nat -> Type P'_dec: foralln : nat, Decidable (P' n) P_inhab: {x : X & P x}
{n : nat & P' n}
X: Type e: nat <~> X P: X -> Type P_dec: forallx : X, Decidable (P x) P':= funn : nat => P (e n): nat -> Type P'_dec: foralln : nat, Decidable (P' n) P_inhab: {x : X & P x} x: X p: P x
{n : nat & P' n}
X: Type e: nat <~> X P: X -> Type P_dec: forallx : X, Decidable (P x) P':= funn : nat => P (e n): nat -> Type P'_dec: foralln : nat, Decidable (P' n) P_inhab: {x : X & P x} x: X p: P x
P' (e^-1 x)
X: Type e: nat <~> X P: X -> Type P_dec: forallx : X, Decidable (P x) P':= funn : nat => P (e n): nat -> Type P'_dec: foralln : nat, Decidable (P' n) P_inhab: {x : X & P x} x: X p: P x
P (e (e^-1 x))
X: Type e: nat <~> X P: X -> Type P_dec: forallx : X, Decidable (P x) P':= funn : nat => P (e n): nat -> Type P'_dec: foralln : nat, Decidable (P' n) P_inhab: {x : X & P x} x: X p: P x
P x
exact p.
X: Type e: nat <~> X P: X -> Type P_dec: forallx : X, Decidable (P x) P_inhab: hexists (funx : X => P x) P':= funn : nat => P (e n): nat -> Type P'_dec: foralln : nat, Decidable (P' n) P'_inhab: hexists (funn : nat => P' n)
{x : X & P x}
X: Type e: nat <~> X P: X -> Type P_dec: forallx : X, Decidable (P x) P_inhab: hexists (funx : X => P x) P':= funn : nat => P (e n): nat -> Type P'_dec: foralln : nat, Decidable (P' n) P'_inhab: hexists (funn : nat => P' n) n: nat p': P' n
{x : X & P x}
X: Type e: nat <~> X P: X -> Type P_dec: forallx : X, Decidable (P x) P_inhab: hexists (funx : X => P x) P':= funn : nat => P (e n): nat -> Type P'_dec: foralln : nat, Decidable (P' n) P'_inhab: hexists (funn : nat => P' n) n: nat p': P' n