Section MaxSetMinSet.
Variable T : finType.
Notation sT := {set T}.
Implicit Types A B C : sT.
Implicit Type P : pred sT.
Definition minset P A := [forall (B : sT | B \subset A), (B == A) == P B].
Arguments minsetP {P A}.
(* The 'locked_with' allows Coq to find the value of P by unification. *)
Fact maxset_key : unit. Proof. by []. Qed.
Definition maxset P A :=
minset (fun B => locked_with maxset_key P (~: B)) (~: A).

Lemma maxset_exists P C : P C -> {A : sT | maxset P A & C \subset A}.