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
e60d3b0c
Commit
e60d3b0c
authored
4 years ago
by
hondet
Browse files
Options
Downloads
Patches
Plain Diff
app_pair
parent
0d459fdc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
paper/proof_irr.lp
+30
-0
30 additions, 0 deletions
paper/proof_irr.lp
with
30 additions
and
0 deletions
paper/proof_irr.lp
+
30
−
0
View file @
e60d3b0c
...
...
@@ -32,6 +32,11 @@ proof
qed
// Proof irrelevance without K
// We need the following axiom for pairs
symbol app_pair {a b: Set} (x y: El a) (p: El a → Bool)
(hx: Prf (p x)) (hy: Prf (p y)) (_: Prf (x = y))
: Prf (@pair _ p x hx = @pair _ p y hy)
symbol plus: El ℕ → El ℕ → El ℕ
set infix left 10 "+" ≔ plus
...
...
@@ -52,5 +57,30 @@ symbol fun_ext (a b: Set) (f g: El (a ~> b)) (_: Prf (∀ (λx, f x = g x))): Pr
symbol plus_commutativity (n m: El ℕ): Prf (n + m = m + n)
theorem even_add_commutativity (n m: El even): Prf (add n m = add m n)
proof
assume n m
refine app_pair (fst n + fst m) (fst m + fst n) even_p _ _ _
refine ℕ
// fst n + fst m is even
refine plus_closed_even n m
// fst m + fst n is even
refine plus_closed_even m n
// fst n + m = fst m + n
refine plus_commutativity (fst n) (fst m)
qed
// Toy example
set declared "n₀"
set declared "n₁"
symbol n₀: El ℕ
symbol n₁: El ℕ
symbol nz_eq_no: Prf (n₀ = n₁)
symbol pred: El ℕ → Bool
symbol pq0: Prf (pred n₀)
symbol pq1: Prf (pred n₁)
definition ps ≔ psub pred
theorem thethm: Prf (@pair ℕ pred n₀ pq0 = @pair ℕ pred n₁ pq1)
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