Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions _RocqProject
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# [tag:flags]
-arg "-set 'Default Goal Selector=!'"
-arg "-set 'Loose Hint Behavior=Strict'"
-arg "-set 'Primitive Projections'"
-arg "-set 'Printing Projections'"
-arg "-unset 'Printing Primitive Projection Parameters'"
-arg "-w +default"
-Q proofs_rocq main
2 changes: 0 additions & 2 deletions proofs_rocq/category_theory/arrow.v
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
(********************)
(********************)

Require Import Stdlib.Classes.Morphisms.
Require Import Stdlib.Classes.Morphisms_Prop.
Require Import main.category_theory.category.
Require Import main.tactics.

Expand Down
1 change: 0 additions & 1 deletion proofs_rocq/category_theory/coproduct.v
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
(************************)
(************************)

Require Import Stdlib.Classes.Morphisms.
Require Import main.category_theory.arrow.
Require Import main.category_theory.category.
Require Import main.category_theory.initial.
Expand Down
1 change: 0 additions & 1 deletion proofs_rocq/category_theory/object.v
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
(*********************)
(*********************)

Require Import Stdlib.Classes.Morphisms.
Require Import main.category_theory.arrow.
Require Import main.category_theory.category.
Require Import main.tactics.
Expand Down
1 change: 0 additions & 1 deletion proofs_rocq/category_theory/terminal.v
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
(******************************)
(******************************)

Require Import Stdlib.Classes.Morphisms.
Require Import main.category_theory.category.
Require Import main.category_theory.initial.
Require Import main.category_theory.object.
Expand Down
7 changes: 1 addition & 6 deletions proofs_rocq/icbics/icbics.v
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Require Import Stdlib.Arith.Compare_dec.
Require Import Stdlib.Lists.List.
Require Import Stdlib.Sorting.Permutation.
Require Import Stdlib.Sorting.Sorted.
Require Import Stdlib.Vectors.FinFun.
Require Import main.tactics.

Import Stdlib.Arith.PeanoNat.Nat.
Expand Down Expand Up @@ -156,7 +157,6 @@ Proof.
induction l; search; intros.
- destruct j; search.
- destruct i; destruct j; search.
apply IHl; search.
Qed.

#[local] Hint Resolve nth_firstn : main.
Expand All @@ -169,9 +169,6 @@ Proof.
intros.
outro i.
induction l; intros; destruct i; search.
change (firstn (S i) (a :: l) ++ [nth (S i) (a :: l) d])
with (a :: firstn i l ++ [nth i l d]).
rewrite IHl; search.
Qed.

#[local] Hint Resolve cons_firstn_nth : main.
Expand Down Expand Up @@ -439,8 +436,6 @@ Proof.
unfold for_loop.
change (length l1) with n1.
induction n1; search.
apply H0; search.
apply IHn1; search.
Qed.

(* Facts about `sort` *)
Expand Down
2 changes: 2 additions & 0 deletions proofs_rocq/kleene/kleene_data.v
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
(****************************************************************)
(****************************************************************)

Require Import main.tactics.

Module Type KleeneData.
(*
Assumption: Let (`T`, `Leq`) be a partially ordered set, or poset. A poset
Expand Down
1 change: 0 additions & 1 deletion proofs_rocq/stlc/name.v
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
(*******************************************)
(*******************************************)

Require Import Stdlib.Arith.Peano_dec.
Require Import main.tactics.

Module Type NameSig.
Expand Down
1 change: 0 additions & 1 deletion proofs_rocq/system_f/context.v
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
(*****************************)
(*****************************)

Require Import Stdlib.Bool.Bool.
Require Import Stdlib.Lists.List.
Require Import main.system_f.free_var.
Require Import main.system_f.local_closure.
Expand Down
3 changes: 0 additions & 3 deletions proofs_rocq/system_f/local_closure.v
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ Theorem t_local_closure_monotonic :
TLocallyClosed t i2.
Proof.
clean. outro i2 H. induction H0; search.
clean. apply tlc_for_all. apply IHTLocallyClosed. search.
Qed.

(* Don't add a resolve hint because `eapply` has a hard time guessing `i1`. *)
Expand All @@ -85,8 +84,6 @@ Proof.
clean. outro ie2 it2 H H0.
induction H1; search; constructor; search; clean.
- apply t_local_closure_monotonic with (i1 := nt); search.
- apply IHELocallyClosed; search.
- apply IHELocallyClosed; search.
- apply t_local_closure_monotonic with (i1 := nt); search.
Qed.

Expand Down
1 change: 0 additions & 1 deletion proofs_rocq/system_f/name.v
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
(*******************************************)
(*******************************************)

Require Import Stdlib.Arith.Peano_dec.
Require Import Stdlib.Lists.List.
Require Import main.tactics.

Expand Down
9 changes: 2 additions & 7 deletions proofs_rocq/system_f/opening.v
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,7 @@ Proof.
induction H2; search; clean.
specialize (IHTLocallyClosed t2 (S i)).
feed IHTLocallyClosed.
- apply t_local_closure_monotonic with (i1 := i); search.
- apply tlc_for_all.
apply IHTLocallyClosed.
search.
apply t_local_closure_monotonic with (i1 := i); search.
Qed.

Hint Resolve locally_closed_open_for_all : main.
Expand Down Expand Up @@ -274,9 +271,7 @@ Proof.
apply t_local_closure_monotonic with (i1 := nt); search.
- specialize (IHELocallyClosed t0 (S it)).
feed IHELocallyClosed.
+ apply t_local_closure_monotonic with (i1 := it); search.
+ apply IHELocallyClosed.
search.
apply t_local_closure_monotonic with (i1 := it); search.
- apply locally_closed_open_for_all; search.
constructor.
apply t_local_closure_monotonic with (i1 := nt); search.
Expand Down
1 change: 0 additions & 1 deletion proofs_rocq/system_f/preservation.v
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
(**************************************)
(**************************************)

Require Import Stdlib.Bool.Bool.
Require Import Stdlib.Lists.List.
Require Import main.system_f.context.
Require Import main.system_f.free_var.
Expand Down
1 change: 0 additions & 1 deletion proofs_rocq/system_f/typing.v
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
(**************************)
(**************************)

Require Import Stdlib.Bool.Bool.
Require Import Stdlib.Lists.List.
Require Import main.system_f.context.
Require Import main.system_f.free_var.
Expand Down
3 changes: 2 additions & 1 deletion proofs_rocq/tactics.v
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

Require Import Stdlib.micromega.Lia.

(* Ensure this hint database exists. *)
(* Ensure these hint databases exist. *)

Create HintDb main.
Create Rewrite HintDb main.

(*
This tactic does a variety of simplifications on the goal and hypotheses.
Expand Down
10 changes: 9 additions & 1 deletion proofs_rocq/tutorial/lesson3_logic.v
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,13 @@ Inductive eq [A] (x : A) : A -> Prop :=
Notation "x = y" := (eq x y) : type_scope.
Notation "x <> y" := (~ (x = y)) : type_scope.

(*
The `rewrite` tactic used below requires some machinery to work with our
new notion of equality. The following command generates it.
*)

Scheme Rewriting for eq.

Definition one_plus_one_equals_two : 1 + 1 = 2 := eq_refl 2.

Goal 1 + 1 = 2.
Expand Down Expand Up @@ -426,7 +433,8 @@ Definition divisible_by_4_implies_even x :
| ex_intro y h2 =>
ex_intro
(2 * y)
match eq_sym (Nat.mul_assoc 2 2 y) in Logic.eq _ z return z = x with
match Logic.eq_sym (Nat.mul_assoc 2 2 y) in Logic.eq _ z return z = x
with
| Logic.eq_refl _ => h2
end
end.
Expand Down
1 change: 0 additions & 1 deletion proofs_rocq/tutorial/lesson4_proof_techniques.v
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
(******************************)
(******************************)

Require Import Stdlib.Arith.Arith. (* For facts in the `arith` hint database *)
Require Import Stdlib.micromega.Lia. (* For the `lia` tactic *)

(****************************)
Expand Down
15 changes: 7 additions & 8 deletions toast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,13 @@ tasks:
command: |
# Install Rocq via opam. The `rocq-prover` package is a virtual package
# with unversioned dependencies on `rocq-core` and `rocq-stdlib`, so
# those two packages must be pinned explicitly.
# those two packages must be pinned explicitly. Note that `rocq-stdlib`
# is versioned independently of `rocq-core`.
opam init --disable-sandboxing --yes
eval "$(opam env)"
opam pin add --no-action rocq-core 9.0.0 --yes
opam pin add --no-action rocq-stdlib 9.0.0 --yes
opam pin add rocq-prover 9.0.0 --yes
opam pin add --no-action rocq-core 9.2.0 --yes
opam pin add --no-action rocq-stdlib 9.1.0 --yes
opam pin add --kind version rocq-prover meta.1 --yes

install_tools:
description: Install the tools needed to verify the Rocq proofs.
Expand Down Expand Up @@ -169,10 +170,9 @@ tasks:
'^\s*Require (Import )?(Stdlib|main)\.' \
"rocq compile \
-set 'Default Goal Selector=!' \
-set 'Loose Hint Behavior=Strict' \
-set 'Primitive Projections' \
-set 'Printing Projections' \
-unset 'Printing Primitive Projection Parameters' \
-w +default \
-Q proofs_rocq main ?" \
$(
find . -type d \( \
Expand All @@ -188,10 +188,9 @@ tasks:
'^\s*Import ' \
"rocq compile \
-set 'Default Goal Selector=!' \
-set 'Loose Hint Behavior=Strict' \
-set 'Primitive Projections' \
-set 'Printing Projections' \
-unset 'Printing Primitive Projection Parameters' \
-w +default \
-Q proofs_rocq main ?" \
$(
find . -type d \( \
Expand Down