main :: IO ()
main = do
  let g = graph

      sym = symbolic g
      num = numeric g


      dpnum = dpowerMap num
      dpsym = dpowerMap sym
      dpsymEq = M.map pushMult dpsym

      dpsymIn = dpsym
      dpsyminterp = M.map (interpretTerm 1 num) dpsymIn

      detailsSym = M.map additiveTerms dpsymEq

      details :: M.Map Idx.DPower [Val]
      details = M.map (map (S.fromScalar . interpretTerm 1 num)) detailsSym

      sumdetails = M.map sum details

      control = dpowerMap (deltaEnv g)
      vars = M.map (length . map (mkVarSet maybeStaticVar)) detailsSym

  putStrLn "\n== Control delta environment (later env - former env, computed independently) =="
  putStrLn (format $ M.toList control)


  putStrLn "\n== Numeric solution =="
  putStrLn (format $ M.toList dpnum)


  putStrLn "\n== Symbolic solution =="
  putStrLn (format $ M.toList dpsymEq)



  putStrLn "\n== Numeric interpretation of symbolic solution =="
  putStrLn (format $ M.toList dpsyminterp)

  putStrLn "\n== Symbolic additive terms =="
  putStrLn (format $ M.toList detailsSym)

  putStrLn "\n== Numeric additive terms =="
  putStrLn (format $ M.toList details)

  putStrLn "\n== Sums of numeric additive terms =="
  putStrLn (format $ M.toList sumdetails)

  putStrLn "\n== Additive terms per stack =="
  putStrLn (format $ M.toList vars)

  drawAll [
    drawTopology g ((mapEqTermEnv ((:[]) . simplify) sym) { recordNumber = SingleRecord rec0 }),
    drawDeltaTopology g ((mapEqTermEnv additiveTerms sym) { recordNumber = SingleRecord rec1 }) ]
main :: IO ()
main = do
  let g = graph

      sym = symbolic g
      num = numeric g


      dpnum = dpowerMap num
      dpsym = dpowerMap sym
      dpsymEq = M.map pushMult dpsym

      dpsymIn = dpsym
      dpsyminterp = M.map (interpretTerm 1 num) dpsymIn

      detailsSym = M.map additiveTerms dpsymEq

      details :: M.Map Idx.DPower [Val]
      details = M.map (map (S.fromScalar . interpretTerm 1 num)) detailsSym

      sumdetails = M.map sum details

      control = dpowerMap (deltaEnv g)
      vars = M.map (length . map (mkVarSet maybeStaticVar)) detailsSym

  putStrLn "\n== Control delta environment (later env - former env, computed independently) =="
  putStrLn (format $ M.toList control)


  putStrLn "\n== Numeric solution =="
  putStrLn (format $ M.toList dpnum)


  putStrLn "\n== Symbolic solution =="
  putStrLn (format $ M.toList dpsymEq)



  putStrLn "\n== Numeric interpretation of symbolic solution =="
  putStrLn (format $ M.toList dpsyminterp)

  putStrLn "\n== Symbolic additive terms =="
  putStrLn (format $ M.toList detailsSym)

  putStrLn "\n== Numeric additive terms =="
  putStrLn (format $ M.toList details)

  putStrLn "\n== Sums of numeric additive terms =="
  putStrLn (format $ M.toList sumdetails)

  putStrLn "\n== Additive terms per stack =="
  putStrLn (format $ M.toList vars)

  drawAll [
    drawTopology g ((mapEqTermEnv ((:[]) . simplify) sym) { recordNumber = SingleRecord rec0 }),
    drawDeltaTopology g ((mapEqTermEnv additiveTerms sym) { recordNumber = SingleRecord rec1 }) ]
main = do
  let g = graph

      sym = symbolic g
      num = numeric g


      dpnum = dpowerMap num
      dpsym = dpowerMap sym
      dpsymEq = M.map pushMult dpsym

      dpsymIn = dpsym
      dpsyminterp = M.map (interpretTerm 1 num) dpsymIn

      detailsSym = M.map additiveTerms dpsymEq

      details :: M.Map Idx.DPower [Val]
      details = M.map (map (S.fromScalar . interpretTerm 1 num)) detailsSym

      sumdetails = M.map sum details

      control = dpowerMap (deltaEnv g)
      vars = M.map (length . map (mkVarSet maybeStaticVar)) detailsSym

  putStrLn "\n== Control delta environment (later env - former env, computed independently) =="
  putStrLn (format $ M.toList control)


  putStrLn "\n== Numeric solution =="
  putStrLn (format $ M.toList dpnum)


  putStrLn "\n== Symbolic solution =="
  putStrLn (format $ M.toList dpsymEq)



  putStrLn "\n== Numeric interpretation of symbolic solution =="
  putStrLn (format $ M.toList dpsyminterp)

  putStrLn "\n== Symbolic additive terms =="
  putStrLn (format $ M.toList detailsSym)

  putStrLn "\n== Numeric additive terms =="
  putStrLn (format $ M.toList details)

  putStrLn "\n== Sums of numeric additive terms =="
  putStrLn (format $ M.toList sumdetails)

  putStrLn "\n== Additive terms per stack =="
  putStrLn (format $ M.toList vars)

  drawAll [
    drawTopology g ((mapEqTermEnv ((:[]) . simplify) sym) { recordNumber = SingleRecord rec0 }),
    drawDeltaTopology g ((mapEqTermEnv additiveTerms sym) { recordNumber = SingleRecord rec1 }) ]