Deactivate Plugin on Theme Switch

I haven’t tested this, so it might not work correctly, but the essence of what you’re trying to do is hook into the after_switch_theme hook and see if the $old_name is DahTheme. If it is, that means that the current theme isn’t DahTheme, so you want to deactivate the plugin.

function wpse_after_switch_theme( $old_name, $old_theme ) {
  if( 'DahTheme' === $old_name ) {
    //* You may or may not need to include wp-admin/includes/plugin.php here
    deactivate_plugins( 'dahplugin/dahplugin.php' );
  }
}
add_action( 'after_switch_theme', 'wpse_after_switch_theme', 10, 2 );