Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
personoj
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
koizel
personoj
Commits
38b5e4ce
Commit
38b5e4ce
authored
4 years ago
by
gabrielhdt
Browse files
Options
Downloads
Patches
Plain Diff
no unif hints
parent
b2035631
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
README.md
+1
-1
1 addition, 1 deletion
README.md
encodings/cert_f.lp
+2
-2
2 additions, 2 deletions
encodings/cert_f.lp
prelude/functions.lp
+4
-0
4 additions, 0 deletions
prelude/functions.lp
prelude/logic.lp
+8
-7
8 additions, 7 deletions
prelude/logic.lp
prelude/numbers.lp
+2
-2
2 additions, 2 deletions
prelude/numbers.lp
with
17 additions
and
12 deletions
README.md
+
1
−
1
View file @
38b5e4ce
...
...
@@ -13,7 +13,7 @@ library, also known as _Prelude_. The prelude is available
## Requirements
-
[
`lambdapi`
](
https://github.com/gabrielhdt/lambdapi.git
)
on the
`
unif_hin
t`
-
[
`lambdapi`
](
https://github.com/gabrielhdt/lambdapi.git
)
on the
`
heavy-le
t`
branch
## Structure
...
...
This diff is collapsed.
Click to expand it.
encodings/cert_f.lp
+
2
−
2
View file @
38b5e4ce
...
...
@@ -26,8 +26,6 @@ injective symbol Term {s: Sort}: Univ s ⇒ TYPE
rule Term uProp → Univ Prop
and Term uType → Univ Type
hint Term &x ≡ Univ Prop → &x ≡ uProp
// [prod s1 s2 A B] encodes [Π x : (A: s1). (B: s2)]
symbol prod {sA: Sort} {sB: Sort} (A: Univ sA):
(Term A ⇒ Univ sB) ⇒ Univ (Rule sA sB)
...
...
@@ -68,6 +66,8 @@ protected symbol opair (T: Univ Type) (P: Term T ⇒ Univ Prop) (M: Term T):
rule pair {&T} &P &M _ → opair &T &P &M
rule fst (opair _ _ &M) → &M
// and opair _ &P (fst {_} {&P} &X) → &X // Surjective pairing
//NOTE: can we remove non linearity?
// The subtype relation
symbol subtype: Term uType ⇒ Term uType ⇒ Term uProp
...
...
This diff is collapsed.
Click to expand it.
prelude/functions.lp
+
4
−
0
View file @
38b5e4ce
...
...
@@ -7,6 +7,10 @@ require personoj.adlib.subtype as S
// functions [D, R: TYPE]
//
// symbol
// extensionality_postulate (D R: Term uType) (f g: Term (D ~> R))
// : Term (biff (forall (λx: Term D, f x = g ) (f = g)))
definition {|injective?|} {D} {R} (f: Term (D ~> R))
≔ forall (λx1, forall (λx2, imp (f x1 = f x2) (x1 = x2)))
...
...
This diff is collapsed.
Click to expand it.
prelude/logic.lp
+
8
−
7
View file @
38b5e4ce
...
...
@@ -28,8 +28,9 @@ symbol if {T: Term uType}: Term uProp ⇒ Term T ⇒ Term T ⇒ Term T
//
// boolean_props
// Slightly modified from the prelude
constant symbol bool_exclusive: Term (neq false true)
constant symbol bool_inclusive A: Term ((eq A false) ∨ (eq A true))
constant symbol bool_exclusive: Term (neq {bool} false true)
constant symbol
bool_inclusive A: Term ((eq {bool} A false) ∨ (eq {bool} A true))
theorem excluded_middle (A: Term bool): Term (A ∨ ¬ A)
proof
...
...
@@ -45,16 +46,16 @@ qed
//
// xor_def
//
definition xor (a b: Term bool) ≔ neq a b
definition xor (a b: Term bool) ≔ neq
{bool}
a b
theorem xor_def (a b: Term bool):
Term (eq (xor a b) (if a (bnot b) b))
Term (eq
{bool}
(xor a b) (if
{bool}
a (bnot b) b))
proof
refine I.disjunction
(λa: Term bool, forall (λb, eq (xor a b) (if a (bnot b) b)))
(λa: Term bool, forall
{bool}
(λb, eq
{bool}
(xor a b) (if
{bool}
a (bnot b) b)))
?Cf ?Ct
refine I.disjunction
(λ b, eq (xor false b) (if false (bnot b) b))
(λ b, eq
{bool}
(xor false b) (if
{bool}
false (bnot b) b))
?Ccf ?Cct
admit
...
...
@@ -122,6 +123,6 @@ print
admit
theorem lift_if2 (S: Term uType) (a b c: Term bool) (x y: Term S):
Term ((if (if a b c) x y) = (if a (if b x y) (if c x y)))
Term ((if (if
{bool}
a b c) x y) = (if a (if b x y) (if c x y)))
proof
admit
This diff is collapsed.
Click to expand it.
prelude/numbers.lp
+
2
−
2
View file @
38b5e4ce
...
...
@@ -57,7 +57,7 @@ symbol closed_plus_real: ∀(x y: Term real),
let ynf ≔ ↑ numfield pr y in
Term (real_pred (xnf + ynf))
hint Term &x ≡ Univ Type → &x ≡ uType
//
hint Term &x ≡ Univ Type → &x ≡ uType
// With polymorphic plus
rule ty_plus real real → real
...
...
@@ -93,7 +93,7 @@ proof
refine S.restr real rational_pred
qed
hint Psub &x ⊑ &y ≡ rational ⊑ real → &x ≡ rational_pred, &y ≡ real
//
hint Psub &x ⊑ &y ≡ rational ⊑ real → &x ≡ rational_pred, &y ≡ real
theorem rat_is_real_auto: Term (rational ⊑ real)
proof
apply S.restr _ _
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment