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
0968aebf
Commit
0968aebf
authored
5 years ago
by
gabrielhdt
Browse files
Options
Downloads
Patches
Plain Diff
sensible rules
parent
163f2c13
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
adlib/subtype.lp
+5
-7
5 additions, 7 deletions
adlib/subtype.lp
with
5 additions
and
7 deletions
adlib/subtype.lp
+
5
−
7
View file @
0968aebf
require open personoj.encodings.cert_f
personoj.adlib.bootstrap
// rule Term (ePsub &A _ ⊑ &A) → Term true
// and Term ((ePsub &A &P) ⊑ (ePsub &B &Q)) →
// ∀(pr: Term (&A ⊑ &B)) (x: Term &A),
// Term (&P x) ⇒ Term (&Q (↑ &B pr x))
// FIXME 'File "src/basics.ml", line 116 character 36-42: Assertion failed'
// A la rewriting logic
rule Psub {&A} _ ⊑ &A → true
and &A ⊑ &A → true
// [eqroot T U] reduces to [true] if [T] and [U] have the same root
symbol eqroot: Term uType ⇒ Term uType ⇒ Term uProp
rule eqroot &X &X → true // NOTE: non linear
rule eqroot &X &X
→ true // NOTE: non linear
and eqroot (Psub {&T} _) &U → eqroot &T &U
and eqroot &T (Psub {&U} _) → eqroot &T &U
...
...
@@ -25,7 +23,7 @@ symbol trans (T U V: Term uType):
// type [T],
// - proof [μ] that [T] has the same root as [U];
// - proof [π] that [T] is a sub-type of [U];
// - proof [ρ] that
//
any element of [T] verifies [P];
// - proof [ρ] that any element of [T] verifies [P];
// [T] is a sub-type of [{x: U | P}].
symbol sub {U: Term uType} (P: Term U ⇒ Term bool) (T: Term uType)
(_: Term (eqroot T U)) (pr: Term (T ⊑ U)):
...
...
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