Skip to content
Open
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: 3 additions & 0 deletions CHANGELOG_UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

- Added a theory of finite permutations in `finperm.v`

- in `finmap.v`:
+ lemma `fset_nat_maximum`

### Changed

### Renamed
Expand Down
9 changes: 9 additions & 0 deletions finmap.v
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@
Reserved Notation "A `=P` B" (at level 70, no associativity).

Reserved Notation "f @`[ key ] A" (at level 24, key at level 0).
Reserved Notation "f @2`[ key ] ( A , B )"

Check warning on line 150 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp-dev:rocq-prover-dev)

Postfix notations (i.e. starting with a nonterminal symbol and

Check warning on line 150 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:2.5.0-rocq-prover-9.0)

Postfix notations (i.e. starting with a nonterminal symbol and

Check warning on line 150 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:2.5.0-rocq-prover-9.1)

Postfix notations (i.e. starting with a nonterminal symbol and

Check warning on line 150 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp-dev:rocq-prover-9.1)

Postfix notations (i.e. starting with a nonterminal symbol and
(at level 24, format "f @2`[ key ] ( A , B )").
Reserved Notation "f @` A" (at level 24).
Reserved Notation "f @2` ( A , B )" (at level 24, format "f @2` ( A , B )").

Check warning on line 153 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp-dev:rocq-prover-dev)

Postfix notations (i.e. starting with a nonterminal symbol and

Check warning on line 153 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:2.5.0-rocq-prover-9.0)

Postfix notations (i.e. starting with a nonterminal symbol and

Check warning on line 153 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:2.5.0-rocq-prover-9.1)

Postfix notations (i.e. starting with a nonterminal symbol and

Check warning on line 153 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp-dev:rocq-prover-9.1)

Postfix notations (i.e. starting with a nonterminal symbol and

(* unary *)
Reserved Notation "[ 'fset' E | x : T 'in' A ]" (at level 0, E, x at level 99).
Expand All @@ -168,9 +168,9 @@
Reserved Notation "[ 'fset' x 'in' A | P & Q ]" (at level 0, x at level 99).

(* binary *)
Reserved Notation "[ 'fset' E | x : T 'in' A , y : T' 'in' B ]"

Check warning on line 171 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp-dev:rocq-prover-dev)

Notations "[ fset _ | _ : _ in _ ]" defined at level 0

Check warning on line 171 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:2.5.0-rocq-prover-9.0)

Notations "[ fset _ | _ : _ in _ ]" defined at level 0

Check warning on line 171 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:2.5.0-rocq-prover-9.1)

Notations "[ fset _ | _ : _ in _ ]" defined at level 0

Check warning on line 171 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp-dev:rocq-prover-9.1)

Notations "[ fset _ | _ : _ in _ ]" defined at level 0
(at level 0, E, x at level 99, A at level 200, y at level 99).
Reserved Notation "[ 'fset' E | x 'in' A , y 'in' B ]"

Check warning on line 173 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp-dev:rocq-prover-dev)

Notations "[ fset _ | _ in _ ]" defined at level 0 with arguments

Check warning on line 173 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:2.5.0-rocq-prover-9.0)

Notations "[ fset _ | _ in _ ]" defined at level 0 with arguments

Check warning on line 173 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:2.5.0-rocq-prover-9.1)

Notations "[ fset _ | _ in _ ]" defined at level 0 with arguments

Check warning on line 173 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp-dev:rocq-prover-9.1)

Notations "[ fset _ | _ in _ ]" defined at level 0 with arguments
(at level 0, E, x at level 99, A at level 200, y at level 99).

(* keyed parse only *)
Expand All @@ -183,11 +183,11 @@
(at level 0, E, x at level 99).
Reserved Notation "[ 'fset[' key ] E | x : A & P ]"
(at level 0, E, x at level 99).
Reserved Notation "[ 'fset[' key ] E | x : T 'in' A , y : T' 'in' B ]"

Check warning on line 186 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp-dev:rocq-prover-dev)

Notations "[ fset[ _ ] _ | _ : _ in _ ]" defined at level 0

Check warning on line 186 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:2.5.0-rocq-prover-9.0)

Notations "[ fset[ _ ] _ | _ : _ in _ ]" defined at level 0

Check warning on line 186 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:2.5.0-rocq-prover-9.1)

Notations "[ fset[ _ ] _ | _ : _ in _ ]" defined at level 0

Check warning on line 186 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp-dev:rocq-prover-9.1)

Notations "[ fset[ _ ] _ | _ : _ in _ ]" defined at level 0
(at level 0, E, x at level 99, A at level 200, y at level 99).
Reserved Notation "[ 'fset[' key ] E | x 'in' A , y 'in' B ]"

Check warning on line 188 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp-dev:rocq-prover-dev)

Notations "[ fset[ _ ] _ | _ in _ ]" defined at level 0

Check warning on line 188 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:2.5.0-rocq-prover-9.0)

Notations "[ fset[ _ ] _ | _ in _ ]" defined at level 0

Check warning on line 188 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:2.5.0-rocq-prover-9.1)

Notations "[ fset[ _ ] _ | _ in _ ]" defined at level 0

Check warning on line 188 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp-dev:rocq-prover-9.1)

Notations "[ fset[ _ ] _ | _ in _ ]" defined at level 0
(at level 0, E, x at level 99, A at level 200, y at level 99).
Reserved Notation "[ 'fset[' key ] E | x : A , y : B ]"

Check warning on line 190 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp-dev:rocq-prover-dev)

Notations "[ fset[ _ ] _ | _ : _ in _ ]" defined at level 0

Check warning on line 190 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:2.5.0-rocq-prover-9.0)

Notations "[ fset[ _ ] _ | _ : _ in _ ]" defined at level 0

Check warning on line 190 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:2.5.0-rocq-prover-9.1)

Notations "[ fset[ _ ] _ | _ : _ in _ ]" defined at level 0

Check warning on line 190 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp-dev:rocq-prover-9.1)

Notations "[ fset[ _ ] _ | _ : _ in _ ]" defined at level 0
(at level 0, E, x at level 99, A at level 200, y at level 99).
Reserved Notation "[ 'fset[' key ] E | x : A , y 'in' B ]"
(at level 0, E, x, y at level 99).
Expand Down Expand Up @@ -233,7 +233,7 @@
Reserved Notation "[ 'f' 'set' x 'in' A | P & Q ]"
(at level 0, x at level 99, format "[ 'f' 'set' x 'in' A | P & Q ]").
(* binary printing only *)
Reserved Notation "[ 'f' 'set' E | x 'in' A , y 'in' B ]"

Check warning on line 236 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp-dev:rocq-prover-dev)

Notations "[ f set _ | _ in _ ]" defined at level 0 with arguments

Check warning on line 236 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:2.5.0-rocq-prover-9.0)

Notations "[ f set _ | _ in _ ]" defined at level 0 with arguments

Check warning on line 236 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:2.5.0-rocq-prover-9.1)

Notations "[ f set _ | _ in _ ]" defined at level 0 with arguments

Check warning on line 236 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp-dev:rocq-prover-9.1)

Notations "[ f set _ | _ in _ ]" defined at level 0 with arguments
(at level 0, E, x at level 99, A at level 200, y at level 99,
format "[ '[hv' 'f' 'set' E '/ ' | x 'in' A , '/' y 'in' B ] ']'").

Expand Down Expand Up @@ -357,7 +357,7 @@
Defined.
Arguments PredType [T pT] toP.

Local Notation predOfType T := (pred_of_simpl (@pred_of_argType T)).

Check warning on line 360 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp-dev:rocq-prover-dev)

Use of "Notation" keyword for abbreviations is deprecated, use

Definition oextract (T : Type) (o : option T) : o -> T :=
if o is Some t return o -> T then fun=> t else False_rect T \o notF.
Expand Down Expand Up @@ -420,7 +420,7 @@

#[global] Hint Resolve SortKeys.perm SortKeys.uniq SortKeys.E : core.

Notation sort_keys := SortKeys.f.

Check warning on line 423 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp-dev:rocq-prover-dev)

Use of "Notation" keyword for abbreviations is deprecated, use
Notation sort_keys_perm := SortKeys.perm.
Notation sort_keys_uniq := SortKeys.uniq.
Notation sort_keysE := SortKeys.E.
Expand Down Expand Up @@ -484,7 +484,7 @@

End Def.

Arguments finSet K%type_scope.

Check warning on line 487 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:2.5.0-rocq-prover-9.0)

The '%' scope delimiter in 'Arguments' commands is deprecated, use

Check warning on line 487 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:2.5.0-rocq-prover-9.1)

The '%' scope delimiter in 'Arguments' commands is deprecated, use

Check warning on line 487 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp-dev:rocq-prover-9.1)

The '%' scope delimiter in 'Arguments' commands is deprecated, use

#[warning="-deprecated-reference"]
Identity Coercion type_of_finset : finset_of >-> finSet.
Expand Down Expand Up @@ -1784,6 +1784,15 @@
by split=> [] [a aP]; [exists (val a); apply: valP|exists [` aP]].
Qed.

Lemma fset_nat_maximum A (f : K -> nat) : A != fset0 ->
(exists i, i \in A /\ forall j, j \in A -> f j <= f i)%N.
Proof.
move=> /fset0Pn[x Ax].
have [/= y _ /(_ _ isT) mf] := @arg_maxnP _ [` Ax]%fset xpredT (f \o val) isT.
exists (val y); split; first exact: valP.
by move=> z Az; have := mf [` Az]%fset.
Qed.

Lemma cardfs_gt0 A : (0 < #|` A|)%N = (A != fset0).
Proof. by rewrite lt0n cardfs_eq0. Qed.

Expand Down Expand Up @@ -2976,7 +2985,7 @@

End DefMap.

Arguments finMap K%type_scope V%type_scope.

Check warning on line 2988 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:2.5.0-rocq-prover-9.0)

The '%' scope delimiter in 'Arguments' commands is deprecated, use

Check warning on line 2988 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:2.5.0-rocq-prover-9.1)

The '%' scope delimiter in 'Arguments' commands is deprecated, use

Check warning on line 2988 in finmap.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp-dev:rocq-prover-9.1)

The '%' scope delimiter in 'Arguments' commands is deprecated, use

Notation "{ 'fmap' K -> T }" := (finMap K T) : type_scope.

Expand Down