Orientations of modules and rays in modules #
This file defines rays in modules and orientations of modules.
Main definitions #
-
module.rayis a type for the equivalence class of nonzero vectors in a module with some common positive multiple. -
orientationis a type synonym formodule.rayfor the case where the module is that of alternating maps from a module to its underlying ring. An orientation may be associated with an alternating map or with a basis. -
module.orientedis a type class for a choice of orientation of a module that is considered the positive orientation.
Implementation notes #
orientation is defined for an arbitrary index type, but the main intended use case is when
that index type is a fintype and there exists a basis of the same cardinality.
References #
- https://en.wikipedia.org/wiki/Orientation_(vector_space)
Two vectors are in the same ray if some positive multiples of them are equal (in the typical
case over a field, this means each is a positive multiple of the other). Over a field, this
is equivalent to mul_action.orbit_rel.
same_ray is reflexive.
same_ray is symmetric.
same_ray is transitive.
same_ray is an equivalence relation.
A vector is in the same ray as a positive multiple of itself.
A vector is in the same ray as a positive multiple of one it is in the same ray as.
A positive multiple of a vector is in the same ray as that vector.
A positive multiple of a vector is in the same ray as one it is in the same ray as.
If two vectors are on the same ray then they remain so after appling a linear map.
If two vectors are on the same ray then they remain so after appling a linear equivalence.
If two vectors are on the same ray then both scaled by the same action are also on the same ray.
The setoid of the same_ray relation for elements of a module.
Nonzero vectors, as used to define rays.
Equations
- ray_vector M = {v // v ≠ 0}
The setoid of the same_ray relation for the subtype of nonzero vectors.
Equations
Equivalence of nonzero vectors, in terms of same_ray.
A ray (equivalence class of nonzero vectors with common positive multiples) in a module.
Equations
- module.ray R M = quotient (ray_vector.same_ray_setoid R M)
An orientation of a module, intended to be used when ι is a fintype with the same
cardinality as a basis.
- positive_orientation : orientation R M ι
A type class fixing an orientation of a module.
The ray given by a nonzero vector.
Equations
- ray_of_ne_zero R v h = ⟦⟨v, h⟩⟧
An induction principle for module.ray, used as induction x using module.ray.ind.
The rays given by two nonzero vectors are equal if and only if those vectors
satisfy same_ray.
The ray given by a positive multiple of a nonzero vector.
An equivalence between modules implies an equivalence between ray vectors.
Equations
An equivalence between modules implies an equivalence between rays.
Equations
An equivalence between modules implies an equivalence between orientations.
Equations
- orientation.map ι e = module.ray.map (alternating_map.dom_lcongr R R ι R e)
Any invertible action preserves the non-zeroness of ray vectors. This is primarily of interest
when G = Rˣ
Equations
- ray_vector.mul_action = {to_has_scalar := {smul := λ (r : G), subtype.map (has_scalar.smul r) _}, one_smul := _, mul_smul := _}
Any invertible action preserves the non-zeroness of rays. This is primarily of interest when
G = Rˣ
Equations
- module.ray.mul_action = {to_has_scalar := {smul := λ (r : G), quotient.map (has_scalar.smul r) _}, one_smul := _, mul_smul := _}
The action via linear_equiv.apply_distrib_mul_action corresponds to module.ray.map.
Scaling by a positive unit is a no-op.
An arbitrary ray_vector giving a ray.
Equations
The ray of some_ray_vector.
An arbitrary nonzero vector giving a ray.
Equations
- x.some_vector = ↑(x.some_ray_vector)
some_vector is nonzero.
The ray of some_vector.
If two vectors are in the same ray, so are their negations.
same_ray.neg as an iff.
If a vector is in the same ray as its negation, that vector is zero.
Negating a nonzero vector.
Equations
- ray_vector.has_neg = {neg := λ (v : ray_vector M), ⟨-↑v, _⟩}
Negating a nonzero vector commutes with coercion to the underlying module.
Negating a nonzero vector twice produces the original vector.
If two nonzero vectors are equivalent, so are their negations.
Negating a ray.
Equations
- module.ray.has_neg R = {neg := quotient.map (λ (v : ray_vector M), -v) _}
The ray given by the negation of a nonzero vector.
Negating a ray twice produces the original ray.
Negating a ray is involutive.
A ray does not equal its own negation.
Scaling by a negative unit is negation.
The orientation given by a basis.
Equations
- e.orientation = ray_of_ne_zero R e.det _
The value of orientation.map when the index type has the cardinality of a basis, in terms
of f.det.
The orientation given by a basis derived using units_smul, in terms of the product of those
units.
same_ray follows from membership of mul_action.orbit for the units.pos_subgroup.
Scaling by an inverse unit is the same as scaling by itself.
A nonzero vector is in the same ray as a multiple of itself if and only if that multiple is positive.
A multiple of a nonzero vector is in the same ray as that vector if and only if that multiple is positive.
The negation of a nonzero vector is in the same ray as a multiple of that vector if and only if that multiple is negative.
A multiple of a nonzero vector is in the same ray as the negation of that vector if and only if that multiple is negative.
A nonzero vector is in the same ray as a multiple of itself if and only if that multiple is positive.
A nonzero vector is in the same ray as a multiple of itself if and only if that multiple is positive.
The orientations given by two bases are equal if and only if the determinant of one basis with respect to the other is positive.
Given a basis, any orientation equals the orientation given by that basis or its negation.
Given a basis, an orientation equals the negation of that given by that basis if and only if it does not equal that given by that basis.
Composing a basis with a linear equiv gives the same orientation if and only if the determinant is positive.
Composing a basis with a linear equiv gives the negation of that orientation if and only if the determinant is negative.
Negating a single basis vector (represented using units_smul) negates the corresponding
orientation.
Given a basis and an orientation, return a basis giving that orientation: either the original basis, or one constructed by negating a single (arbitrary) basis vector.
Equations
- e.adjust_to_orientation x = ite (e.orientation = x) e (e.units_smul (function.update 1 (classical.arbitrary ι) (-1)))
adjust_to_orientation gives a basis with the required orientation.
Every basis vector from adjust_to_orientation is either that from the original basis or its
negation.
same_ray is equivalent to membership of mul_action.orbit for the units.pos_subgroup.
same_ray_setoid equals mul_action.orbit_rel for the units.pos_subgroup.
If the index type has cardinality equal to the finite dimension, any two orientations are equal or negations.
If the index type has cardinality equal to the finite dimension, an orientation equals the negation of another orientation if and only if they are not equal.
The value of orientation.map when the index type has cardinality equal to the finite
dimension, in terms of f.det.
If the index type has cardinality equal to the finite dimension, composing an alternating map with the same linear equiv on each argument gives the same orientation if and only if the determinant is positive.
If the index type has cardinality equal to the finite dimension, composing an alternating map with the same linear equiv on each argument gives the negation of that orientation if and only if the determinant is negative.
If the index type has cardinality equal to the finite dimension, a basis with the given orientation.
Equations
some_basis gives a basis with the required orientation.