Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-07 10:15:19

0001 /*
0002     Copyright (C) 2017 Luca De Feo
0003 
0004     This file is part of FLINT.
0005 
0006     FLINT is free software: you can redistribute it and/or modify it under
0007     the terms of the GNU Lesser General Public License (LGPL) as published
0008     by the Free Software Foundation; either version 3 of the License, or
0009     (at your option) any later version.  See <https://www.gnu.org/licenses/>.
0010 */
0011 
0012 #ifdef T
0013 #ifdef B
0014 
0015 #include "templates.h"
0016 
0017 #ifdef __cplusplus
0018 extern "C" {
0019 #endif
0020 
0021 void TEMPLATE(T, embed_gens)(TEMPLATE(T, t) gen_sub,
0022                                        TEMPLATE(T, t) gen_sup,
0023                                        TEMPLATE(B, poly_t) minpoly,
0024                                        const TEMPLATE(T, ctx_t) sub_ctx,
0025                                        const TEMPLATE(T, ctx_t) sup_ctx);
0026 void _TEMPLATE(T, embed_gens_naive)(TEMPLATE(T, t) gen_sub,
0027                                               TEMPLATE(T, t) gen_sup,
0028                                               TEMPLATE(B, poly_t) minpoly,
0029                                               const TEMPLATE(T, ctx_t) sub_ctx,
0030                                               const TEMPLATE(T, ctx_t) sup_ctx);
0031 void _TEMPLATE(T, embed_gens_allombert)(TEMPLATE(T, t) gen_sub,
0032                                                   TEMPLATE(T, t) gen_sup,
0033                                                   TEMPLATE(B, poly_t) minpoly,
0034                                                   const TEMPLATE(T, ctx_t) sub_ctx,
0035                                                   const TEMPLATE(T, ctx_t) sup_ctx);
0036 
0037 /* Convert to-from column vectors */
0038 void TEMPLATE(T, embed_matrices)(TEMPLATE(B, mat_t) embed,
0039                                            TEMPLATE(B, mat_t) project,
0040                                            const TEMPLATE(T, t) gen_sub,
0041                                            const TEMPLATE(T, ctx_t) sub_ctx,
0042                                            const TEMPLATE(T, t) gen_sup,
0043                                            const TEMPLATE(T, ctx_t) sup_ctx,
0044                                            const TEMPLATE(B, poly_t) gen_minpoly);
0045 
0046 /* Given:
0047 
0048    - a context `sup_ctx` defining a field K of degree n,
0049    - a context `sub_ctx` defining a subfield k of degree m|n,
0050    - the n×m change-of-basis matrix from k to K,
0051 
0052    Return the m×n matrix of the trace from K to k.
0053    If m=n, res is the inverse of basis.
0054 */
0055 void TEMPLATE(T, embed_trace_matrix)(TEMPLATE(B, mat_t) res,
0056                                          const TEMPLATE(B, mat_t) basis,
0057                                          const TEMPLATE(T, ctx_t) sub_ctx,
0058                                          const TEMPLATE(T, ctx_t) sup_ctx);
0059 
0060 /* Compute the matrix whose columns are (gen^0, gen^1, ..., gen^(trunc-1)) */
0061 void TEMPLATE(T, embed_composition_matrix_sub)(TEMPLATE(B, mat_t) matrix,
0062                                                    const TEMPLATE(T, t) gen,
0063                                                    const TEMPLATE(T, ctx_t) ctx,
0064                                                    slong trunc);
0065 
0066 void TEMPLATE(T, embed_composition_matrix)(TEMPLATE(B, mat_t) matrix,
0067                                      const TEMPLATE(T, t) gen,
0068                                      const TEMPLATE(T, ctx_t) ctx);
0069 
0070 void TEMPLATE(T, embed_mul_matrix)(TEMPLATE(B, mat_t) matrix,
0071                                        const TEMPLATE(T, t) gen,
0072                                        const TEMPLATE(T, ctx_t) ctx);
0073 
0074 void TEMPLATE(T, embed_mono_to_dual_matrix)(TEMPLATE(B, mat_t) res,
0075                                                 const TEMPLATE(T, ctx_t) ctx);
0076 void TEMPLATE(T, embed_dual_to_mono_matrix)(TEMPLATE(B, mat_t) res,
0077                                                 const TEMPLATE(T, ctx_t) ctx);
0078 
0079 #ifdef __cplusplus
0080 }
0081 #endif
0082 
0083 #endif
0084 #endif