Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Iris
stdpp
Commits
099e760b
Commit
099e760b
authored
Aug 04, 2016
by
Robbert Krebbers
Browse files
Unfolding properties for Nat.iter.
parent
cac96811
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/numbers.v
View file @
099e760b
...
...
@@ -82,7 +82,7 @@ Proof. intros. destruct (Nat_mul_split_l n x2 x1 y2 y1); auto with lia. Qed.
Notation
lcm
:
=
Nat
.
lcm
.
Notation
divide
:
=
Nat
.
divide
.
Notation
"( x | y )"
:
=
(
divide
x
y
)
:
nat_scope
.
Instance
divide_dec
x
y
:
Decision
(
x
|
y
).
Instance
Nat_
divide_dec
x
y
:
Decision
(
x
|
y
).
Proof
.
refine
(
cast_if
(
decide
(
lcm
x
y
=
y
)))
;
by
rewrite
Nat
.
divide_lcm_iff
.
Defined
.
...
...
@@ -94,6 +94,11 @@ Hint Extern 0 (_ | _) => reflexivity.
Lemma
Nat_divide_ne_0
x
y
:
(
x
|
y
)
→
y
≠
0
→
x
≠
0
.
Proof
.
intros
Hxy
Hy
->.
by
apply
Hy
,
Nat
.
divide_0_l
.
Qed
.
Lemma
Nat_iter_S
{
A
}
n
(
f
:
A
→
A
)
x
:
Nat
.
iter
(
S
n
)
f
x
=
f
(
Nat
.
iter
n
f
x
).
Proof
.
done
.
Qed
.
Lemma
Nat_iter_S_r
{
A
}
n
(
f
:
A
→
A
)
x
:
Nat
.
iter
(
S
n
)
f
x
=
Nat
.
iter
n
f
(
f
x
).
Proof
.
induction
n
;
f_equal
/=
;
auto
.
Qed
.
(** * Notations and properties of [positive] *)
Open
Scope
positive_scope
.
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment