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
eb656410
Commit
eb656410
authored
4 years ago
by
gabrielhdt
Browse files
Options
Downloads
Patches
Plain Diff
some numbers
parent
f86cb27b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
prelude/numbers.lp
+25
-22
25 additions, 22 deletions
prelude/numbers.lp
with
25 additions
and
22 deletions
prelude/numbers.lp
+
25
−
22
View file @
eb656410
...
...
@@ -7,39 +7,42 @@ require open personoj.prelude.logic
//
// Theory numbers
//
//
constant symbol number:
Term uType
constant symbol number:
ϕ {|set|}
//
//
//
// Theory number_fields
//
//
//
symbol field_pred:
Term number → Univ Prop
//
definition number_field ≔
P
sub field_pred
//
// number_field is an uninterpreted subtype
//
definition numfield ≔ number_field
//
// Theory number_fields
//
constant
symbol field_pred:
η (PRED number)
definition number_field ≔
p
sub field_pred
// number_field is an uninterpreted subtype
definition numfield ≔ number_field
//
symbol {|+|}:
Term
numfield
→ Term
numfield
→ Term
numfield
//
set infix left 6 "+" ≔ {|+|}
//
symbol {|-|}:
Term
numfield
→ Term
numfield
→ Term
numfield
//
set infix
left
6 "-" ≔ {|-|}
symbol {|+|}:
η (
numfield
~>
numfield
~>
numfield
)
set infix left 6 "+" ≔ {|+|}
symbol {|-|}:
η (
numfield
~>
numfield
~>
numfield
)
set infix 6 "-" ≔ {|-|}
//
// Other way to extend type of functions,
// Other way to extend type of functions,
// symbol ty_plus: Term uType → Term uType → Term uType
// symbol polyplus {T: Term uType} {U: Term uType}
// : Term T → Term U → Term (ty_plus T U)
// // plus is defined on numfield
// rule ty_plus numfield numfield ↪ numfield
// symbol commutativ_add (x y: Term numfield): Term ((x + y) = (y + x))
// symbol associative_add (x y z: Term numfield): Term (x + (y + z) = (x + y) + z)
// // FIXME add a cast on zero?
// // symbol identity_add (x: Term numfield): Term (x + zero = x)
constant
symbol commutative_add : ε (forall (λx, forall (λy, x + y = y + x)))
constant
symbol associative_add
: ε (forall (λx, forall (λy, forall (λz, x + (y + z) = (x + y) + z))))
// FIXME add a cast on zero?
// symbol identity_add (x: Term numfield): Term (x + zero = x)
//
//
//
// reals
//
//
//
symbol real_pred:
Term
(pred numfield)
//
definition real ≔
P
sub real_pred
//
// reals
//
constant
symbol real_pred:
η
(pred numfield)
definition real ≔
p
sub real_pred
// theorem real_not_empty: Term (∃ real_pred)
// proof admit
...
...
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