In [1]:

```
import proveit
# Automation is not needed when building an expression:
proveit.defaults.automation = False # This will speed things up.
proveit.defaults.inline_pngs = False # Makes files smaller.
%load_expr # Load the stored expression as 'stored_expr'
# import Expression classes needed to build the expression
from proveit import A, B, f
from proveit.logic import And, Bijections, Equals, Forall, InSet, Injections, Surjections
```

In [2]:

```
# build up the expression from sub-expressions
expr = Forall(instance_param_or_params = [A, B], instance_expr = Forall(instance_param_or_params = [f], instance_expr = Equals(InSet(f, Bijections(A, B)), And(InSet(f, Injections(A, B)), InSet(f, Surjections(A, B)))).with_wrapping_at(2)))
```

In [3]:

```
# check that the built expression is the same as the stored expression
assert expr == stored_expr
assert expr._style_id == stored_expr._style_id
print("Passed sanity check: expr matches stored_expr")
```

In [4]:

```
# Show the LaTeX representation of the expression for convenience if you need it.
print(stored_expr.latex())
```

In [5]:

```
stored_expr.style_options()
```

In [6]:

```
# display the expression information
stored_expr.expr_info()
```

These web pages were generated on 2022-11-05 by Prove-It Beta Version 0.3, licensed under the GNU Public License by Sandia Corporation.

Presented proofs are not absolutely guaranteed. For assurance, it is important to check the structure of the statement being proven, independently verify the derivation steps, track dependencies, and ensure that employed axioms are valid and properly structured. Inconsistencies may exist, unknowingly, in this system.

This material is based upon work supported by the U.S. Department of Energy, Office of Science, Office of Advanced Scientific Computing Research, under the Quantum Computing Application Teams program. Sandia National Labs is managed and operated by National Technology and Engineering Solutions of Sandia, LLC, a subsidiary of Honeywell International, Inc., for the U.S. Dept. of Energy's NNSA under contract DE-NA0003525. The views expressed above do not necessarily represent the views of the DOE or the U.S. Government.

Please send questions/comments to: wwitzel@sandia.gov.