(* The 'locked_with' allows Coq to find the value of P by unification. *)
Definition maxset P A :=
minset (fun B => locked_with maxset_key P (~: B)) (~: A).

(* Specifications: *)
Lemma maxset_eq P1 P2 A : P1 =1 P2 -> maxset P1 A = maxset P2 A.
Lemma maxsetP P A :
reflect ((P A) /\ (forall B, P B -> A \subset B -> B = A)) (maxset P A).
Lemma maxsetp P A : maxset P A -> P A.
Lemma maxset_exists P C : P C -> {A : sT | maxset P A & C \subset A}.
End MaxSetMinSet.