refactored GeoProofSchemes cherrypicked from hgg workbench