Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
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
Pierre Roux
Iris
Commits
9084fa77
Commit
9084fa77
authored
4 years ago
by
Simon Friis Vindum
Browse files
Options
Downloads
Patches
Plain Diff
Add local update for min_nat and minor tweaks
parent
38ff0fc1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/algebra/numbers.v
+15
-6
15 additions, 6 deletions
theories/algebra/numbers.v
with
15 additions
and
6 deletions
theories/algebra/numbers.v
+
15
−
6
View file @
9084fa77
...
@@ -81,16 +81,16 @@ Section max_nat.
...
@@ -81,16 +81,16 @@ Section max_nat.
Global
Instance
max_nat_core_id
(
x
:
max_nat
)
:
CoreId
x
.
Global
Instance
max_nat_core_id
(
x
:
max_nat
)
:
CoreId
x
.
Proof
.
by
constructor
.
Qed
.
Proof
.
by
constructor
.
Qed
.
Lemma
max_nat_local_update
(
x
y
x'
:
max_nat
UR
)
:
Lemma
max_nat_local_update
(
x
y
x'
:
max_nat
)
:
max_nat_car
x
≤
max_nat_car
x'
→
(
x
,
y
)
~l
~>
(
x'
,
x'
)
.
max_nat_car
x
≤
max_nat_car
x'
→
(
x
,
y
)
~l
~>
(
x'
,
x'
)
.
Proof
.
Proof
.
move
:
x
y
x'
=>
[
x
]
[
y
]
[
y'
]
/=
?
?
.
move
:
x
y
x'
=>
[
x
]
[
y
]
[
y'
]
/=
?
.
apply
local_update_unital_discrete
=>
[[
z
]]
_
.
rewrite
local_update_unital_discrete
=>
[[
z
]]
_
.
rewrite
2
!
max_nat_op_max
.
in
version
1
.
rewrite
2
!
max_nat_op_max
.
in
tros
[
=
?]
.
split
;
first
done
.
apply
f_equal
.
lia
.
split
;
first
done
.
apply
f_equal
.
lia
.
Qed
.
Qed
.
Global
Instance
:
@
IdemP
max_nat
(
=
)
(
⋅
)
.
Global
Instance
:
IdemP
(
=@
{
max_nat
}
)
(
⋅
)
.
Proof
.
intros
[
x
]
.
rewrite
max_nat_op_max
.
apply
f_equal
.
lia
.
Qed
.
Proof
.
intros
[
x
]
.
rewrite
max_nat_op_max
.
apply
f_equal
.
lia
.
Qed
.
End
max_nat
.
End
max_nat
.
...
@@ -127,13 +127,22 @@ Section min_nat.
...
@@ -127,13 +127,22 @@ Section min_nat.
Global
Instance
min_nat_core_id
(
x
:
min_nat
)
:
CoreId
x
.
Global
Instance
min_nat_core_id
(
x
:
min_nat
)
:
CoreId
x
.
Proof
.
by
constructor
.
Qed
.
Proof
.
by
constructor
.
Qed
.
Lemma
min_nat_local_update
(
x
y
x'
:
min_nat
)
:
min_nat_car
x'
≤
min_nat_car
x
→
(
x
,
y
)
~l
~>
(
x'
,
x'
)
.
Proof
.
move
:
x
y
x'
=>
[
x
]
[
y
]
[
x'
]
/=
?
.
rewrite
local_update_discrete
.
move
=>
[[
z
]|]
_
/=
;
last
done
.
rewrite
2
!
min_nat_op_min
.
intros
[
=
?]
.
split
;
first
done
.
apply
f_equal
.
lia
.
Qed
.
Global
Instance
:
LeftAbsorb
(
=
)
(
MinNat
0
)
(
⋅
)
.
Global
Instance
:
LeftAbsorb
(
=
)
(
MinNat
0
)
(
⋅
)
.
Proof
.
done
.
Qed
.
Proof
.
done
.
Qed
.
Global
Instance
:
RightAbsorb
(
=
)
(
MinNat
0
)
(
⋅
)
.
Global
Instance
:
RightAbsorb
(
=
)
(
MinNat
0
)
(
⋅
)
.
Proof
.
intros
[
x
]
.
by
rewrite
min_nat_op_min
Min
.
min_0_r
.
Qed
.
Proof
.
intros
[
x
]
.
by
rewrite
min_nat_op_min
Min
.
min_0_r
.
Qed
.
Global
Instance
:
@
IdemP
min_nat
(
=
)
(
⋅
)
.
Global
Instance
:
IdemP
(
=@
{
min_nat
}
)
(
⋅
)
.
Proof
.
intros
[
x
]
.
rewrite
min_nat_op_min
.
apply
f_equal
.
lia
.
Qed
.
Proof
.
intros
[
x
]
.
rewrite
min_nat_op_min
.
apply
f_equal
.
lia
.
Qed
.
End
min_nat
.
End
min_nat
.
...
...
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