import proveit
# Prepare this notebook for defining the theorems of a theory:
%theorems_notebook # Keep this at the top following 'import proveit'.
from proveit import n
from proveit.logic import Forall, InSet, CartExp, InClass
from proveit.numbers import NaturalPos, Rational, Real, Complex
from proveit.linear_algebra import VecSpaces
%begin theorems
Number field vector sets are vector spaces:
rational_vec_set_is_vec_space = Forall(
n, InClass(CartExp(Rational, n), VecSpaces(Rational)),
domain = NaturalPos)
real_vec_set_is_vec_space = Forall(
n, InClass(CartExp(Real, n), VecSpaces(Real)),
domain = NaturalPos)
complex_vec_set_is_vec_space = Forall(
n, InClass(CartExp(Complex, n), VecSpaces(Complex)),
domain = NaturalPos)
As special cases, number fields are also vector spaces:
rational_set_is_vec_space = InClass(Rational, VecSpaces(Rational))
real_set_is_vec_space = InClass(Real, VecSpaces(Real))
complex_set_is_vec_space = InClass(Complex, VecSpaces(Complex))
%end theorems