This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Set Primitive Projections. | |
| From Coq Require Import Program. | |
| From stdpp Require Import fin. | |
| Module Forall. | |
| Inductive t {A : Type} (P : A -> Type) : list A -> Type := | |
| | nil : t P List.nil | |
| | cons : forall {x xs}, P x -> t P xs -> t P (cons x xs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Set Primitive Projections. | |
| Module Container. | |
| Record t (I : Type) (O : Type) : Type := | |
| { | |
| Command : forall (o : O), Type; (* shape *) | |
| Response : forall (o : O) (c : Command o), Type; (* position or degree *) | |
| next : forall (o : O) (c : Command o) (r : Response o c), I; | |
| } as C. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Inductive Ty : Set := | |
| | base | |
| | fn (A B : Ty) | |
| . | |
| Inductive Ctx : Set := | |
| | cnil | |
| | cext (Γ : Ctx) (A : Ty) | |
| . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From Coq Require Import String. | |
| From stdpp Require Import base strings. | |
| Section AUX. | |
| #[global] Instance option_eq_dec_normalizable A `{dec : EqDecision A} : EqDecision (option A). | |
| Proof. | |
| intros x y. destruct x as [x|], y as [y|]. | |
| - destruct (decide (x = y)). | |
| + left. congruence. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# OPTIONS --safe #-} | |
| module Cubical.HITs.CauchyReal.Base where | |
| open import Cubical.Foundations.Prelude | |
| open import Cubical.Data.Rationals.Base | |
| open import Cubical.Data.Rationals.Order | |
| open import Cubical.Data.Rationals.Properties | |
| open import Cubical.Data.PositiveRational.Base | |
| -- Higher inductive-inductive construction of Cauchy real, as in the HoTT book. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From Coq Require Import Lia. | |
| Section TERMINATION. | |
| Inductive terminate (P : nat -> Prop) : nat -> Prop := | |
| | found : forall n, P n -> terminate P n | |
| | step : forall n, terminate P (S n) -> terminate P n | |
| . | |
| Fixpoint terminate_ind_dep |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Set Primitive Projections. | |
| From Coq Require | |
| Program | |
| Logic.ProofIrrelevance | |
| Logic.PropExtensionality | |
| Logic.FunctionalExtensionality | |
| Logic.Epsilon | |
| Relations.Relation_Operators. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From Coq Require Fin. | |
| Definition ifun (X Y : nat -> Type) : Type := forall i, X i -> Y i. | |
| Definition δ (X : nat -> Type) (n : nat) := X (S n). | |
| Definition prod (X Y : nat -> Type) (n : nat) := (X n * Y n)%type. | |
| Definition sum (X Y : nat -> Type) (n : nat) := (X n + Y n)%type. | |
| Definition TermF' (X : nat -> Type) := sum (δ X) (prod X X). | |
| Variant TermF (X : nat -> Type) : nat -> Type := |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CoInductive bits : Set := | |
| | c0 : bits -> bits | |
| | c1 : bits -> bits. | |
| Lemma bits_eta : forall xs, match xs with | |
| | c0 xs' => c0 xs' | |
| | c1 xs' => c1 xs' | |
| end = xs. | |
| Proof. | |
| intro xs. destruct xs; reflexivity. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data I = T | F | |
| data TreeF :: (I -> Type) -> (I -> Type) where | |
| Tip :: Int -> TreeF f T | |
| Forest :: f F -> TreeF f T | |
| Nil :: TreeF f F | |
| Cons :: f T -> f F -> TreeF f F | |
| data Tree :: I -> Type where | |
| Fold :: TreeF Tree i -> Tree i |
NewerOlder