Skip to content
GitLab
Menu
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
b897f00c
Commit
b897f00c
authored
Nov 09, 2018
by
Robbert Krebbers
Browse files
Add `Nat_iter_add`.
parent
df509b21
Pipeline
#12784
passed with stage
in 14 minutes and 3 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
theories/numbers.v
View file @
b897f00c
...
@@ -92,7 +92,11 @@ Proof. intros Hxy Hy ->. by apply Hy, Nat.divide_0_l. Qed.
...
@@ -92,7 +92,11 @@ 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
).
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
.
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
).
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
.
Proof
.
induction
n
;
by
f_equal
/=.
Qed
.
Lemma
Nat_iter_add
{
A
}
n1
n2
(
f
:
A
→
A
)
x
:
Nat
.
iter
(
n1
+
n2
)
f
x
=
Nat
.
iter
n1
f
(
Nat
.
iter
n2
f
x
).
Proof
.
induction
n1
;
by
f_equal
/=.
Qed
.
Lemma
Nat_iter_ind
{
A
}
(
P
:
A
→
Prop
)
f
x
k
:
Lemma
Nat_iter_ind
{
A
}
(
P
:
A
→
Prop
)
f
x
k
:
P
x
→
(
∀
y
,
P
y
→
P
(
f
y
))
→
P
(
Nat
.
iter
k
f
x
).
P
x
→
(
∀
y
,
P
y
→
P
(
f
y
))
→
P
(
Nat
.
iter
k
f
x
).
Proof
.
induction
k
;
simpl
;
auto
.
Qed
.
Proof
.
induction
k
;
simpl
;
auto
.
Qed
.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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