<jupyter_start><jupyter_text>Francy - An Interactive Discrete Mathematics Framework for GAP             <NAME>        Universidade Aberta, Lisbon - Portugal        <EMAIL>                <NAME>        University of St Andrews, St Andrews - Scotland        <EMAIL>     Agenda        Motivation    Solution    Features    Hands-on    Future     1. MotivationFrancy arose from the necessity of having a lightweight framework for building interactive graphics, generated from GAP, running primarily on the web, primarily in a Jupyter Notebook.1.1 What is Francy?    an interface to draw graphics using objects;    based on simple concepts of drawing and graph theory;    2 components:            a GAP package that is responsible for the semantic representation of graphics;        a GUI library that is responsible for generating the actual interactive graphical representation.     2. Solution2.1 GAP Package    provides a semantic representation of graphics is provided by a thin layer.    uses JSON, a lightweight, text-based, language-independent data interchange format.    follows a JSON Schema, and is identified with the application/vnd.francy+json MIME type.2.2 GUI Library - Javascript    based on d3.js, for rendering the semantic representation produced by the GAP package;    this library is distributed both as a browser module and as a Jupyter extension.2.3 Jupyter GAP Kernel    pure GAP package that implements the Jupyter Kernel specification;    "glues" everything together.The Jupyter extension can be used in Jupyter Notebooks or Jupyter Lab, using the Jupyter GAP Kernel and the MIME type application/vnd.francy+json to render the document.This creates an abstraction and allows the development of new GUI libraries, using different data rendering dependencies or even different programming languages, independently of the GAP package. 3. Features    allows the creation of directed and undirected graphs, trees, line charts, bar charts and scatter charts;    enables interaction with graphical objects by clicking, selecting, dragging and zooming;3.1 How to install 1. download latest release and extract the GAP package to GAP packages directory```bashuser@local:~$ wget https://github.com/mcmartins/francy/archive/v0.8.2.tar.gz && \    mkdir -p $GAPROOT/pkg/francy && \    tar xzvf v0.8.2.tar.gz -C $GAPROOT/pkg/francy francy-0.8.2/gap``` 2. install latest jupyter extension using pip and install on Jupyter lab and/or notebook```bashuser@local:~$ pip install jupyter_francyuser@local:~$ jupyter lab build  for JupyterLabuser@local:~$ jupyter nbextension enable --py --sys-prefix jupyter_francy  for Notebook``` 4. Hands-on<jupyter_code>LoadPackage("francy");
LoadPackage("digraph");
FrancyDigraphs := function(G)
    local as, d, v, e, graph, nodes, m, IsGroupSimple, canvas, i;

    as := AllSubgroups(G);;

    d := Digraph(as, {H, K} -> IsSubgroup(H, K));;
    v := DigraphVertices(d);;
    e := DigraphEdges(d);;

    graph := Graph(GraphType.DIRECTED);;
    canvas := Canvas(Concatenation("Subgroups Digraph of ", String(G)));;
    Add(canvas, graph);;

    nodes := [];;

    m := FrancyMessage(FrancyMessageType.INFO, "Simple Groups", 
        "A group is simple if it is nontrivial and has no nontrivial normal subgroups.");;
    
    IsGroupSimple := function(i)
        Add(canvas, m);;
        if IsSimpleGroup(as[i]) then
            Add(canvas, FrancyMessage("Simple", Concatenation("The vertex ", 
                String(i), ", representing the subgroup ", String(as[i]), ", is simple.")));;
        else
            Add(canvas, FrancyMessage("Not Simple", Concatenation("The vertex ", 
                String(i), ", representing the subgroup ", String(as[i]), ", is not simple.")));;
        fi;;
        return Draw(canvas);
    end;;

    for i in v do;
        nodes[i] := Shape(ShapeType.CIRCLE, String(i));;
        Add(nodes[i], Menu("Simple", Callback(IsGroupSimple, [i])));;
        Add(graph, nodes[i]);;
    od;;

    for i in e do
        Add(graph, Link(nodes[i[1]], nodes[i[2]]));;
    od;;

    return Draw(canvas);
end;
G := DihedralGroup(4);
FrancyDigraphs(G);<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09724903474903475, 'fraction_numerical': 0.00723938223938224, 'mean_word_length': 3.5251091703056767, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '539887', 'license': 'MIT', 'n_tokens_mistral': 1213, 'n_tokens_neox': 1151, 'n_words': 444, 'path': 'notebooks/ICMS_2018.ipynb', 'repo_name': 'mcmartins/fidm', 'size': '4204'}